4.2. Using sched_yield and Other Synchronization Mechanisms
sched_yieldsystem call is used by a thread allowing other threads a chance to run. Often when
sched_yieldis used, the thread can go to the end of the run queues, taking a long time to be scheduled again, or it can be rescheduled straight away, creating a busy loop on the CPU. The scheduler is better able to determine when and if there are actually other threads wanting to run. Avoid using
sched_yieldon any RT task.
For more information, or for further reading, the following man pages are related to the information given in this section.