title: Behavior of sched_yield
body: <p>I have few questions about the <code>sched_yield</code> function because I'm seeing that it is not functioning as intended in my code. Many times I see that the same thread runs again and again, even in the presence of other threads, when I try to yield it by calling <code>sched_yield</code>. </p>
  
  <p>Also If I have multicores, will <code>sched_yield</code> yield for threads running on all cores, or only one core. Say for example I have Threads 1, 2 and 3 running on core 1 and Threads 4, 5 and 6 on core 2 and If <code>sched_yield</code> is called from Thread 2, will it be replaced by Thread 1 and 3 only, or 1, 3, 4, 5 and 6 are all possible? I am asking this because in .Net <code>Thread.Yield</code> only yields to threads running on the same core/processor. </p>