1 .\" Hey Emacs! This file is -*- nroff -*- source.
3 .\" Copyright (C) Tom Bjorkholm & Markus Kuhn, 1996
5 .\" This is free documentation; you can redistribute it and/or
6 .\" modify it under the terms of the GNU General Public License as
7 .\" published by the Free Software Foundation; either version 2 of
8 .\" the License, or (at your option) any later version.
10 .\" The GNU General Public License's references to "object code"
11 .\" and "executables" are to be interpreted as the output of any
12 .\" document formatting or typesetting system, including
13 .\" intermediate and printed output.
15 .\" This manual is distributed in the hope that it will be useful,
16 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
17 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 .\" GNU General Public License for more details.
20 .\" You should have received a copy of the GNU General Public
21 .\" License along with this manual; if not, write to the Free
22 .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
25 .\" 1996-04-01 Tom Bjorkholm <tomb@mydata.se>
26 .\" First version written
27 .\" 1996-04-10 Markus Kuhn <mskuhn@cip.informatik.uni-erlangen.de>
29 .\" Modified 2004-05-27 by Michael Kerrisk <mtk.manpages@gmail.com>
31 .TH SCHED_SETPARAM 2 2006-03-23 "Linux" "Linux Programmer's Manual"
33 sched_setparam, sched_getparam \- set and get scheduling parameters
38 .BI "int sched_setparam(pid_t " pid ", const struct sched_param *" param );
40 .BI "int sched_getparam(pid_t " pid ", struct sched_param *" param );
42 \fBstruct sched_param {
44 int \fIsched_priority\fB;
50 sets the scheduling parameters associated with the scheduling policy
51 for the process identified by \fIpid\fP.
52 If \fIpid\fP is zero, then
53 the parameters of the current process are set.
55 the parameter \fIparam\fP depends on the scheduling
56 policy of the process identified by
59 .BR sched_setscheduler (2)
60 for a description of the scheduling policies supported under Linux.
63 retrieves the scheduling parameters for the
64 process identified by \fIpid\fP.
65 If \fIpid\fP is zero, then the parameters
66 of the current process are retrieved.
69 checks the validity of \fIparam\fP for the scheduling policy of the
71 The parameter \fIparam->sched_priority\fP must lie within the
73 .BR sched_get_priority_min (2)
75 .BR sched_get_priority_max (2).
77 For a discussion of the privileges and resource limits related to
78 scheduling priority and policy, see
79 .BR sched_setscheduler (2).
81 POSIX systems on which
86 .B _POSIX_PRIORITY_SCHEDULING
94 On error, \-1 is returned, and
100 The parameter \fIparam\fP does not make sense for the current
104 The calling process does not have appropriate privileges
105 (Linux: does not have the
110 The process whose ID is \fIpid\fP could not be found.
116 .BR sched_get_priority_max (2),
117 .BR sched_get_priority_min (2),
118 .BR sched_getaffinity (2),
119 .BR sched_getscheduler (2),
120 .BR sched_setaffinity (2),
121 .BR sched_setscheduler (2),
125 .I Programming for the real world \- POSIX.4
126 by Bill O. Gallmeister, O'Reilly & Associates, Inc., ISBN 1-56592-074-0