Fixed return check in SwitchToThread

Patch on mailing list by Andrey Vasilkin
This commit is contained in:
Armin Novak 2019-01-18 13:02:30 +01:00
parent 0e5fe9e11a
commit b08505cbe0

View File

@ -735,7 +735,7 @@ BOOL SwitchToThread(VOID)
* Note: on some operating systems sched_yield is a stub returning -1.
* usleep should at least trigger a context switch if any thread is waiting.
*/
if (!sched_yield())
if (sched_yield() != 0)
usleep(1);
return TRUE;