pte: pte_osThreadWaitForEnd checking return of Sys::waitpid

close #165
This commit is contained in:
David Carlier
2023-03-30 07:58:59 +01:00
parent 07329c9efe
commit 4d244dee96
+3 -1
View File
@@ -233,7 +233,9 @@ pub unsafe extern "C" fn pte_osThreadDelete(handle: pte_osThreadHandle) -> pte_o
#[no_mangle]
pub unsafe extern "C" fn pte_osThreadWaitForEnd(handle: pte_osThreadHandle) -> pte_osResult {
let mut status = 0;
Sys::waitpid(handle, &mut status, 0);
if Sys::waitpid(handle, &mut status, 0) < 0 {
return PTE_OS_GENERAL_FAILURE;
}
PTE_OS_OK
}