diff options
| author | Alejandro Colomar <alx@kernel.org> | 2024-04-26 15:06:49 +0200 |
|---|---|---|
| committer | Alejandro Colomar <alx@kernel.org> | 2024-05-02 01:24:19 +0200 |
| commit | dcde2f70372b49ec43efc5db864c9ff585d0a2dd (patch) | |
| tree | 78b9b7425130e4a5858e4c01a524d802423879ed /man/man2/sched_setparam.2 | |
| parent | 12aca537ce78a41bbcdaf485209691e10f8002d7 (diff) | |
| download | man-pages-dcde2f70372b49ec43efc5db864c9ff585d0a2dd.tar.gz | |
man/, share/mk/: Move man*/ to man/
This is a scripted change:
$ mkdir man/;
$ mv man* man/;
$ ln -st . man/man*;
$ find share/mk/ -type f \
| xargs grep -l '^MANDIR *:=' \
| xargs sed -i '/^MANDIR *:=/s,$,/man,';
$ find share/mk/dist/ -type f \
| xargs grep -l man \
| xargs sed -i 's,man%,man/%,g';
Link: <https://lore.kernel.org/linux-man/YxcV4h+Xn7cd6+q2@pevik/T/>
Cc: Petr Vorel <pvorel@suse.cz>
Cc: Jakub Wilk <jwilk@jwilk.net>
Cc: Stefan Puiu <stefan.puiu@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'man/man2/sched_setparam.2')
| -rw-r--r-- | man/man2/sched_setparam.2 | 121 |
1 files changed, 121 insertions, 0 deletions
diff --git a/man/man2/sched_setparam.2 b/man/man2/sched_setparam.2 new file mode 100644 index 0000000000..20aff7aa15 --- /dev/null +++ b/man/man2/sched_setparam.2 @@ -0,0 +1,121 @@ +.\" Copyright (C) Tom Bjorkholm & Markus Kuhn, 1996 +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" 1996-04-01 Tom Bjorkholm <tomb@mydata.se> +.\" First version written +.\" 1996-04-10 Markus Kuhn <mskuhn@cip.informatik.uni-erlangen.de> +.\" revision +.\" Modified 2004-05-27 by Michael Kerrisk <mtk.manpages@gmail.com> +.\" +.TH sched_setparam 2 (date) "Linux man-pages (unreleased)" +.SH NAME +sched_setparam, sched_getparam \- set and get scheduling parameters +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include <sched.h> +.P +.BI "int sched_setparam(pid_t " pid ", const struct sched_param *" param ); +.BI "int sched_getparam(pid_t " pid ", struct sched_param *" param ); +.P +\fBstruct sched_param { + ... + int \fIsched_priority\fB; + ... +}; +.fi +.SH DESCRIPTION +.BR sched_setparam () +sets the scheduling parameters associated with the scheduling policy +for the thread whose thread ID is specified in \fIpid\fP. +If \fIpid\fP is zero, then +the parameters of the calling thread are set. +The interpretation of +the argument \fIparam\fP depends on the scheduling +policy of the thread identified by +.IR pid . +See +.BR sched (7) +for a description of the scheduling policies supported under Linux. +.P +.BR sched_getparam () +retrieves the scheduling parameters for the +thread identified by \fIpid\fP. +If \fIpid\fP is zero, then the parameters +of the calling thread are retrieved. +.P +.BR sched_setparam () +checks the validity of \fIparam\fP for the scheduling policy of the +thread. +The value \fIparam\->sched_priority\fP must lie within the +range given by +.BR sched_get_priority_min (2) +and +.BR sched_get_priority_max (2). +.P +For a discussion of the privileges and resource limits related to +scheduling priority and policy, see +.BR sched (7). +.P +POSIX systems on which +.BR sched_setparam () +and +.BR sched_getparam () +are available define +.B _POSIX_PRIORITY_SCHEDULING +in \fI<unistd.h>\fP. +.SH RETURN VALUE +On success, +.BR sched_setparam () +and +.BR sched_getparam () +return 0. +On error, \-1 is returned, and +.I errno +is set to indicate the error. +.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 +.RB ( sched_setparam ()) +The caller does not have appropriate privileges +(Linux: does not have the +.B CAP_SYS_NICE +capability). +.TP +.B ESRCH +The thread whose ID is \fIpid\fP could not be found. +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001. +.SH SEE ALSO +.ad l +.nh +.BR getpriority (2), +.BR gettid (2), +.BR nice (2), +.BR sched_get_priority_max (2), +.BR sched_get_priority_min (2), +.BR sched_getaffinity (2), +.BR sched_getscheduler (2), +.BR sched_setaffinity (2), +.BR sched_setattr (2), +.BR sched_setscheduler (2), +.BR setpriority (2), +.BR capabilities (7), +.BR sched (7) |
