summaryrefslogtreecommitdiffstats
path: root/man2/sched_setscheduler.2
diff options
context:
space:
mode:
Diffstat (limited to 'man2/sched_setscheduler.2')
-rw-r--r--man2/sched_setscheduler.228
1 files changed, 14 insertions, 14 deletions
diff --git a/man2/sched_setscheduler.2 b/man2/sched_setscheduler.2
index 20ad5c2..ec67aef 100644
--- a/man2/sched_setscheduler.2
+++ b/man2/sched_setscheduler.2
@@ -3,7 +3,7 @@
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.\"
-.TH sched_setscheduler 2 2023-03-30 "Linux man-pages 6.05.01"
+.TH sched_setscheduler 2 2023-10-31 "Linux man-pages 6.7"
.SH NAME
sched_setscheduler, sched_getscheduler \-
set and get scheduling policy/parameters
@@ -13,7 +13,7 @@ Standard C library
.SH SYNOPSIS
.nf
.B #include <sched.h>
-.PP
+.P
.BI "int sched_setscheduler(pid_t " pid ", int " policy ,
.BI " const struct sched_param *" param );
.BI "int sched_getscheduler(pid_t " pid );
@@ -26,11 +26,11 @@ sets both the scheduling policy and parameters for the
thread whose ID is specified in \fIpid\fP.
If \fIpid\fP equals zero, the
scheduling policy and parameters of the calling thread will be set.
-.PP
+.P
The scheduling parameters are specified in the
.I param
argument, which is a pointer to a structure of the following form:
-.PP
+.P
.in +4n
.EX
struct sched_param {
@@ -40,13 +40,13 @@ struct sched_param {
};
.EE
.in
-.PP
+.P
In the current implementation, the structure contains only one field,
.IR sched_priority .
The interpretation of
.I param
depends on the selected policy.
-.PP
+.P
Currently, Linux supports the following "normal"
(i.e., non-real-time) scheduling policies as values that may be specified in
.IR policy :
@@ -63,11 +63,11 @@ for "batch" style execution of processes; and
for running
.I very
low priority background jobs.
-.PP
+.P
For each of the above policies,
.I param\->sched_priority
must be 0.
-.PP
+.P
Various "real-time" policies are also supported,
for special time-critical applications that need precise control over
the way in which runnable threads are selected for execution.
@@ -82,7 +82,7 @@ a first-in, first-out policy; and
.TP
.B SCHED_RR
a round-robin policy.
-.PP
+.P
For each of the above policies,
.I param\->sched_priority
specifies a scheduling priority for the thread.
@@ -93,7 +93,7 @@ and
with the specified
.IR policy .
On Linux, these system calls return, respectively, 1 and 99.
-.PP
+.P
Since Linux 2.6.32, the
.B SCHED_RESET_ON_FORK
flag can be ORed in
@@ -106,7 +106,7 @@ do not inherit privileged scheduling policies.
See
.BR sched (7)
for details.
-.PP
+.P
.BR sched_getscheduler ()
returns the current scheduling policy of the thread
identified by \fIpid\fP.
@@ -155,7 +155,7 @@ and details vary across systems.
For example, the Solaris 7 manual page says that
the real or effective user ID of the caller must
match the real user ID or the save set-user-ID of the target.
-.PP
+.P
The scheduling policy and parameters are in fact per-thread
attributes on Linux.
The value returned from a call to
@@ -178,7 +178,7 @@ instead of the
system calls.)
.SH STANDARDS
POSIX.1-2008 (but see BUGS below).
-.PP
+.P
.B SCHED_BATCH
and
.B SCHED_IDLE
@@ -194,7 +194,7 @@ That page also describes an additional policy,
.BR SCHED_DEADLINE ,
which is settable only via
.BR sched_setattr (2).
-.PP
+.P
POSIX systems on which
.BR sched_setscheduler ()
and