-.\" Hey Emacs! This file is -*- nroff -*- source.
-.\"
.\" Copyright (C) Tom Bjorkholm & Markus Kuhn, 1996
.\"
+.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
.\" This is free documentation; you can redistribute it and/or
.\" modify it under the terms of the GNU General Public License as
.\" published by the Free Software Foundation; either version 2 of
.\" GNU General Public License for more details.
.\"
.\" You should have received a copy of the GNU General Public
-.\" License along with this manual; if not, write to the Free
-.\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
-.\" USA.
+.\" License along with this manual; if not, see
+.\" <http://www.gnu.org/licenses/>.
+.\" %%%LICENSE_END
.\"
.\" 1996-04-01 Tom Bjorkholm <tomb@mydata.se>
.\" First version written
.\" revision
.\" Modified 2004-05-27 by Michael Kerrisk <mtk.manpages@gmail.com>
.\"
-.TH SCHED_SETPARAM 2 2006-03-23 "Linux" "Linux Programmer's Manual"
+.TH SCHED_SETPARAM 2 2014-05-11 "Linux" "Linux Programmer's Manual"
.SH NAME
sched_setparam, sched_getparam \- set and get scheduling parameters
.SH SYNOPSIS
policy of the process identified by
.IR pid .
See
-.BR sched_setscheduler (2)
+.BR sched (7)
for a description of the scheduling policies supported under Linux.
.BR sched_getparam ()
.BR sched_setparam ()
checks the validity of \fIparam\fP for the scheduling policy of the
-process.
+thread.
The value \fIparam\->sched_priority\fP must lie within the
range given by
.BR sched_get_priority_min (2)
For a discussion of the privileges and resource limits related to
scheduling priority and policy, see
-.BR sched_setscheduler (2).
+.BR sched (7).
POSIX systems on which
.BR sched_setparam ()
are available define
.B _POSIX_PRIORITY_SCHEDULING
in \fI<unistd.h>\fP.
-.SH "RETURN VALUE"
+.SH RETURN VALUE
On success,
.BR sched_setparam ()
and
.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 calling process does not have appropriate privileges
(Linux: does not have the
.B CAP_SYS_NICE
.TP
.B ESRCH
The process whose ID is \fIpid\fP could not be found.
-.SH "CONFORMING TO"
+.SH CONFORMING TO
POSIX.1-2001.
-.SH "SEE ALSO"
+.SH NOTES
+.PP
+Scheduling parameters are in fact per-thread
+attributes on Linux;
+see
+.BR sched (7).
+.SH SEE ALSO
+.ad l
+.nh
.BR getpriority (2),
.BR nice (2),
.BR sched_get_priority_max (2),
.BR sched_getscheduler (2),
.BR sched_setaffinity (2),
.BR sched_setscheduler (2),
+.BR sched_setattr (2),
.BR setpriority (2),
-.BR capabilities (7)
-.PP
-.I Programming for the real world \- POSIX.4
-by Bill O. Gallmeister, O'Reilly & Associates, Inc., ISBN 1-56592-074-0
+.BR capabilities (7),
+.BR sched (7)
+.SH COLOPHON
+This page is part of release 3.79 of the Linux
+.I man-pages
+project.
+A description of the project,
+information about reporting bugs,
+and the latest version of this page,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.