]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
sched_yield.2: Rename NOTES to CAVEATS, and reorder contents
authorAlejandro Colomar <alx@kernel.org>
Wed, 3 May 2023 16:47:27 +0000 (18:47 +0200)
committerAlejandro Colomar <alx@kernel.org>
Wed, 3 May 2023 16:47:29 +0000 (18:47 +0200)
Put the last paragraph at the top of the CAVEATS section, since it's
probably the most important for readers.  This system call is likely not
the right one for most programs; let's discourage its use.

Link: <https://www.realworldtech.com/forum/?threadid=189711&curpostid=189752>
Cc: Andrew Clayton <a.clayton@nginx.com>
Signed-off-by: Alejandro Colomar <alx@nginx.com>
man2/sched_yield.2

index 5e5b45a489e1187149bea4de1977029c221f6804..4eb8580184ccfb422a56f97d298564f1a4378b1f 100644 (file)
@@ -48,7 +48,18 @@ is available defined
 .B _POSIX_PRIORITY_SCHEDULING
 in
 .IR <unistd.h> .
-.SH NOTES
+.SH CAVEATS
+.BR sched_yield ()
+is intended for use with real-time scheduling policies (i.e.,
+.B SCHED_FIFO
+or
+.BR SCHED_RR ).
+Use of
+.BR sched_yield ()
+with nondeterministic scheduling policies such as
+.B SCHED_OTHER
+is unspecified and very likely means your application design is broken.
+.PP
 If the calling thread is the only thread in the highest
 priority list at that time,
 it will continue to run after a call to
@@ -61,16 +72,5 @@ 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 real-time scheduling policies (i.e.,
-.B SCHED_FIFO
-or
-.BR SCHED_RR ).
-Use of
-.BR sched_yield ()
-with nondeterministic scheduling policies such as
-.B SCHED_OTHER
-is unspecified and very likely means your application design is broken.
 .SH SEE ALSO
 .BR sched (7)