]> git.ipfire.org Git - thirdparty/man-pages.git/blobdiff - man2/sched_setparam.2
capabilities.7: Add pivot_root(2) to CAP_SYS_ADMIN list
[thirdparty/man-pages.git] / man2 / sched_setparam.2
index 45dd461ea4f55ac8b693f0d5e110efa3980d65b0..9c1f8ed43d374b6080b990244337f229c1a3fc4f 100644 (file)
 .\"            revision
 .\" Modified 2004-05-27 by Michael Kerrisk <mtk.manpages@gmail.com>
 .\"
-.TH SCHED_SETPARAM 2 2014-05-11 "Linux" "Linux Programmer's Manual"
+.TH SCHED_SETPARAM 2 2019-03-06 "Linux" "Linux Programmer's Manual"
 .SH NAME
 sched_setparam, sched_getparam \- set and get scheduling parameters
 .SH SYNOPSIS
 .nf
 .B #include <sched.h>
-.sp
+.PP
 .BI "int sched_setparam(pid_t " pid ", const struct sched_param *" param );
-.sp
+.PP
 .BI "int sched_getparam(pid_t " pid ", struct sched_param *" param );
-.sp
+.PP
 \fBstruct sched_param {
     ...
     int \fIsched_priority\fB;
@@ -47,23 +47,23 @@ sched_setparam, sched_getparam \- set and get scheduling parameters
 .SH DESCRIPTION
 .BR sched_setparam ()
 sets the scheduling parameters associated with the scheduling policy
-for the process identified by \fIpid\fP.
+for the thread whose thread ID is specified in \fIpid\fP.
 If \fIpid\fP is zero, then
-the parameters of the calling process are set.
+the parameters of the calling thread are set.
 The interpretation of
 the argument \fIparam\fP depends on the scheduling
-policy of the process identified by
+policy of the thread identified by
 .IR pid .
 See
 .BR sched (7)
 for a description of the scheduling policies supported under Linux.
-
+.PP
 .BR sched_getparam ()
 retrieves the scheduling parameters for the
-process identified by \fIpid\fP.
+thread identified by \fIpid\fP.
 If \fIpid\fP is zero, then the parameters
-of the calling process are retrieved.
-
+of the calling thread are retrieved.
+.PP
 .BR sched_setparam ()
 checks the validity of \fIparam\fP for the scheduling policy of the
 thread.
@@ -72,11 +72,11 @@ range given by
 .BR sched_get_priority_min (2)
 and
 .BR sched_get_priority_max (2).
-
+.PP
 For a discussion of the privileges and resource limits related to
 scheduling priority and policy, see
 .BR sched (7).
-
+.PP
 POSIX systems on which
 .BR sched_setparam ()
 and
@@ -96,28 +96,32 @@ is set appropriately.
 .SH ERRORS
 .TP
 .B EINVAL
+Invalid arguments:
+.I param
+is NULL or
+.I pid
+is negative
+.TP
+.B EINVAL
+.RB ( sched_setparam ())
 The argument \fIparam\fP does not make sense for the current
 scheduling policy.
 .TP
 .B EPERM
-The calling process does not have appropriate privileges
+.RB ( sched_setparam ())
+The caller does not have appropriate privileges
 (Linux: does not have the
 .B CAP_SYS_NICE
 capability).
 .TP
 .B ESRCH
-The process whose ID is \fIpid\fP could not be found.
+The thread whose ID is \fIpid\fP could not be found.
 .SH CONFORMING TO
-POSIX.1-2001.
-.SH NOTES
-.PP
-Scheduling parameters are in fact per-thread
-attributes on Linux;
-see
-.BR sched (7).
+POSIX.1-2001, POSIX.1-2008.
 .SH SEE ALSO
 .ad l
 .nh
+.BR gettid (2),
 .BR getpriority (2),
 .BR nice (2),
 .BR sched_get_priority_max (2),
@@ -125,8 +129,8 @@ see
 .BR sched_getaffinity (2),
 .BR sched_getscheduler (2),
 .BR sched_setaffinity (2),
-.BR sched_setscheduler (2),
 .BR sched_setattr (2),
+.BR sched_setscheduler (2),
 .BR setpriority (2),
 .BR capabilities (7),
 .BR sched (7)