OSDN Git Service

LDP: Update original to LDP v3.79
[linuxjm/LDP_man-pages.git] / original / man2 / sched_setparam.2
index 0757513..6ab0ef1 100644 (file)
@@ -1,7 +1,6 @@
-.\" 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
@@ -18,9 +17,9 @@
 .\" 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
@@ -28,7 +27,7 @@
 .\"            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
@@ -56,7 +55,7 @@ the argument \fIparam\fP depends on the scheduling
 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 ()
@@ -67,7 +66,7 @@ of the calling process are retrieved.
 
 .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)
@@ -76,7 +75,7 @@ and
 
 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 ()
@@ -85,7 +84,7 @@ and
 are available define
 .B _POSIX_PRIORITY_SCHEDULING
 in \fI<unistd.h>\fP.
-.SH "RETURN VALUE"
+.SH RETURN VALUE
 On success,
 .BR sched_setparam ()
 and
@@ -97,10 +96,19 @@ is set appropriately.
 .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
@@ -108,9 +116,17 @@ capability).
 .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),
@@ -119,8 +135,16 @@ POSIX.1-2001.
 .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/.