From: Alejandro Colomar <alx.manpages@gmail.com>
To: linux-man@vger.kernel.org, a.clayton@nginx.com
Cc: Alejandro Colomar <alx@kernel.org>,
andrew@digital-domain.net, Alejandro Colomar <alx@nginx.com>
Subject: [PATCH 3/3] sched_yield.2: Rename NOTES to CAVEATS, and reorder contents
Date: Wed, 3 May 2023 19:03:53 +0200 [thread overview]
Message-ID: <20230503170353.25998-4-alx@kernel.org> (raw)
In-Reply-To: <20230503170353.25998-1-alx@kernel.org>
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 | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/man2/sched_yield.2 b/man2/sched_yield.2
index 5e5b45a48..4eb858018 100644
--- a/man2/sched_yield.2
+++ b/man2/sched_yield.2
@@ -48,7 +48,18 @@ .SH HISTORY
.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 @@ .SH NOTES
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)
--
2.40.1
prev parent reply other threads:[~2023-05-03 17:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-03 17:03 [PATCH 0/3] Discourage sched_yield(2) Alejandro Colomar
2023-05-03 17:03 ` [PATCH 1/3] sched_yield.2: HISTORY: POSIX.1-2008 makes this non-optional Alejandro Colomar
2023-05-03 17:03 ` [PATCH 2/3] sched_yield.2: NOTES: Remove misleading sentence Alejandro Colomar
2023-05-03 17:03 ` Alejandro Colomar [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230503170353.25998-4-alx@kernel.org \
--to=alx.manpages@gmail.com \
--cc=a.clayton@nginx.com \
--cc=alx@kernel.org \
--cc=alx@nginx.com \
--cc=andrew@digital-domain.net \
--cc=linux-man@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox