sched_yield.2: sched_yield() is intended for use with real-time scheduling policies

Reported-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2017-09-29 22:43:30 +02:00
parent 454f90d7b7
commit 9ce1d9202d
1 changed files with 11 additions and 0 deletions

View File

@ -76,5 +76,16 @@ unnecessarily or inappropriately
schedulable threads are still held by the caller),
since doing so will result in unnecessary context switches,
which will degrade system performance.
.PP
.BR sched_yield ()
is intended for use with read-time scheduling policies (i.e.,
.BR SCHED_FIFO
or
.BR SCHED_RR ).
Use of
.BR sched_yield ()
with nondeterministic scheduling policies such as
.BR SCHED_OTHER
is unspecified and very likely means your application design is broken.
.SH SEE ALSO
.BR sched (7)