mirror of https://github.com/mkerrisk/man-pages
sched_setscheduler.2: Scheduling policy and parameters are per-thread on Linux
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
76006a4ae0
commit
d59995118d
|
@ -453,6 +453,29 @@ and details vary across systems.
|
|||
For example, the Solaris 7 manual page says that
|
||||
the real or effective user ID of the calling process must
|
||||
match the real user ID or the save set-user-ID of the target process.
|
||||
|
||||
.PP
|
||||
The scheduling policy and parameters are in fact per-thread
|
||||
attributes on Linux.
|
||||
The value returned from a call to
|
||||
.BR gettid (2)
|
||||
can be passed in the argument
|
||||
.IR pid .
|
||||
Specifying
|
||||
.I pid
|
||||
as 0 will operate on the attribute for the calling thread,
|
||||
and passing the value returned from a call to
|
||||
.BR getpid (2)
|
||||
will operate on the attribute for the main thread of the thread group.
|
||||
(If you are using the POSIX threads API, then use
|
||||
.BR pthread_setschedparam (3),
|
||||
.BR pthread_getschedparam (3),
|
||||
and
|
||||
.BR pthread_setschedprio (3),
|
||||
instead of the
|
||||
.BR sched_* (2)
|
||||
system calls.)
|
||||
|
||||
.PP
|
||||
Originally, Standard Linux was intended as a general-purpose operating
|
||||
system being able to handle background processes, interactive
|
||||
|
|
Loading…
Reference in New Issue