[newlib-cygwin/main] Cygwin: doc: add SCHED_BATCH, SCHED_IDLE and SCHED_RESET_ON_FORK
Corinna Vinschen
corinna@sourceware.org
Mon Dec 16 11:56:29 GMT 2024
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=14dda1f59871a12eb8e43141bf79d1dd89341ce2
commit 14dda1f59871a12eb8e43141bf79d1dd89341ce2
Author: Christian Franke <christian.franke@t-online.de>
AuthorDate: Thu Dec 12 17:22:55 2024 +0100
Commit: Corinna Vinschen <corinna@vinschen.de>
CommitDate: Mon Dec 16 12:26:28 2024 +0100
Cygwin: doc: add SCHED_BATCH, SCHED_IDLE and SCHED_RESET_ON_FORK
Signed-off-by: Christian Franke <christian.franke@t-online.de>
Diff:
---
winsup/doc/posix.xml | 37 ++++++++++++++++++++++---------------
1 file changed, 22 insertions(+), 15 deletions(-)
diff --git a/winsup/doc/posix.xml b/winsup/doc/posix.xml
index 436ab00a743c..2782beb86547 100644
--- a/winsup/doc/posix.xml
+++ b/winsup/doc/posix.xml
@@ -1771,25 +1771,32 @@ Over-allocation on sparse files is entirely ignored on Windows.</para>
<para><function>sched_setpolicy</function> only emulates API behavior
because Windows does not offer alternative scheduling policies.
-If <literal>SCHED_OTHER</literal> is selected, the Windows priority is
-set according to the nice value. If <literal>SCHED_FIFO</literal>
-or <literal>SCHED_RR</literal> is selected, the nice value is preserved
-and the Windows priority is set according to the
-<literal>sched_priority</literal> value.</para>
+If <literal>SCHED_OTHER</literal> or <literal>SCHED_BATCH</literal> is
+selected, the Windows priority is set according to the nice value.
+If <literal>SCHED_IDLE</literal> is selected, the Windows priority is
+set to <literal>IDLE_PRIORITY_CLASS</literal>.
+If <literal>SCHED_FIFO</literal> or <literal>SCHED_RR</literal> is
+selected, the nice value is preserved and the Windows priority is set
+according to the <literal>sched_priority</literal> value.
+If the <literal>SCHED_RESET_ON_FORK</literal> flag is set, realtime
+policies and negative nice values are dropped on
+<function>fork</function>.</para>
<para><function>nice</function>, <function>setpriority</function>,
<function>sched_setparam</function> and <function>sched_setpolicy</function>
-map the nice value (<literal>SCHED_OTHER</literal>) or the
-<literal>sched_priority</literal> (<literal>SCHED_FIFO</literal>,
-<literal>SCHED_RR</literal>) to Windows priority classes as follows:</para>
+map the nice value (<literal>SCHED_OTHER</literal>,
+<literal>SCHED_BATCH</literal>) or the <literal>sched_priority</literal>
+(<literal>SCHED_FIFO</literal>, <literal>SCHED_RR</literal>) to Windows
+priority classes as follows:</para>
<screen>
- nice value sched_priority Windows priority class
- 12...19 1....6 IDLE_PRIORITY_CLASS
- 4...11 7...12 BELOW_NORMAL_PRIORITY_CLASS
- -4....3 13...18 NORMAL_PRIORITY_CLASS
- -12...-5 19...24 ABOVE_NORMAL_PRIORITY_CLASS
- -13..-19 25...30 HIGH_PRIORITY_CLASS
- -20 31...32 REALTIME_PRIORITY_CLASS
+ SCHED_OTHER SCHED_BATCH SCHED_FIFO/RR
+ nice value nice value sched_priority Windows priority class
+ 12...19 4...19 1....6 IDLE_PRIORITY_CLASS
+ 4...11 -4....3 7...12 BELOW_NORMAL_PRIORITY_CLASS
+ -4....3 -12...-5 13...18 NORMAL_PRIORITY_CLASS
+ -12...-5 -13..-19 19...24 ABOVE_NORMAL_PRIORITY_CLASS
+ -13..-19 -20 25...30 HIGH_PRIORITY_CLASS
+ -20 - 31...32 REALTIME_PRIORITY_CLASS
</screen>
The use of values which are mapped to the
<literal>REALTIME_PRIORITY_CLASS</literal> require administrative
More information about the Cygwin-cvs
mailing list