
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.
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.