Added timedout as return on thrd_join

This commit is contained in:
NeGate 2022-06-29 03:27:50 -04:00
parent ad6ed34b5d
commit e043976466
1 changed files with 4 additions and 1 deletions

View File

@ -52,8 +52,11 @@ int thrd_equal(thrd_t thr0, thrd_t thr1) {
}
int thrd_join(thrd_t thr, int *res) {
if (WaitForSingleObject(thr.handle, INFINITE) == WAIT_FAILED) {
DWORD wait = WaitForSingleObject(thr.handle, INFINITE);
if (wait == WAIT_FAILED) {
return thrd_error;
} else if (wait == WAIT_TIMEOUT) {
return thrd_timedout;
}
if (res != NULL) {