From: Armin Novak Date: Fri, 18 Jan 2019 12:02:30 +0000 (+0100) Subject: Fixed return check in SwitchToThread X-Git-Tag: 2.0.0~560^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b08505cbe039b9c71d49fadb19d3e2c724e7bfd4;p=platform%2Fupstream%2Ffreerdp.git Fixed return check in SwitchToThread Patch on mailing list by Andrey Vasilkin --- diff --git a/winpr/libwinpr/thread/thread.c b/winpr/libwinpr/thread/thread.c index c65bba4..404db8f 100644 --- a/winpr/libwinpr/thread/thread.c +++ b/winpr/libwinpr/thread/thread.c @@ -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;