pthread_yield.3: pthread_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:46:28 +02:00
parent 9ce1d9202d
commit 46f2cf80f4
1 changed files with 11 additions and 0 deletions

View File

@ -71,6 +71,17 @@ instead.
.SH NOTES
On Linux, this function is implemented as a call to
.BR sched_yield (2).
.PP
.BR pthread_yield ()
is intended for use with read-time scheduling policies (i.e.,
.BR SCHED_FIFO
or
.BR SCHED_RR ).
Use of
.BR pthread_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_yield (2),
.BR pthreads (7),