sched_setparam.2: Clarify that scheduling parameters are per-thread (not per-process)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2018-05-18 09:54:31 +02:00
parent 5fbfa7335f
commit 603a9fa5b6
1 changed files with 8 additions and 13 deletions

View File

@ -47,12 +47,12 @@ 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)
@ -60,9 +60,9 @@ 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
@ -109,24 +109,19 @@ scheduling policy.
.TP
.B EPERM
.RB ( sched_setparam ())
The calling process does not have appropriate privileges
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, POSIX.1-2008.
.SH NOTES
.PP
Scheduling parameters are in fact per-thread
attributes on Linux;
see
.BR sched (7).
.SH SEE ALSO
.ad l
.nh
.BR gettid (2),
.BR getpriority (2),
.BR nice (2),
.BR sched_get_priority_max (2),