winpr/thread: fix SwitchToThread
authorNorbert Federa <norbert.federa@thincast.com>
Thu, 2 Jun 2016 13:38:57 +0000 (15:38 +0200)
committerNorbert Federa <norbert.federa@thincast.com>
Thu, 2 Jun 2016 13:38:57 +0000 (15:38 +0200)
commit458f6069348fe9df8959ebed482496388ab85818
tree61c860e308d83c0f47299492dbbe95fd8ee42ac1
parente718fb324b4e6966d83d33eafb26d343b03ed5dc
winpr/thread: fix SwitchToThread

On some operating systems sched_yield is a stub returning returning -1.
In that case use usleep which should at least trigger a context switch
if any thread is waiting.
winpr/libwinpr/thread/thread.c