Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions core/shared/platform/windows/win_thread.c
Original file line number Diff line number Diff line change
Expand Up @@ -516,10 +516,11 @@ os_cond_wait_internal(korp_cond *cond, korp_mutex *mutex, bool timed,

/* Unlock mutex, wait sem and lock mutex again */
os_mutex_unlock(mutex);
int wait_result;
if (timed)
os_sem_reltimed_wait(&node->sem, useconds);
wait_result = os_sem_reltimed_wait(&node->sem, useconds);
else
os_sem_wait(&node->sem);
wait_result = os_sem_wait(&node->sem);
os_mutex_lock(mutex);

/* Remove wait node from wait list */
Expand All @@ -535,7 +536,7 @@ os_cond_wait_internal(korp_cond *cond, korp_mutex *mutex, bool timed,
}
os_mutex_unlock(&cond->wait_list_lock);

return BHT_OK;
return wait_result;
}

int
Expand Down