OSDN Git Service

Update README
[linuxjm/LDP_man-pages.git] / original / man3 / pthread_attr_setschedparam.3
index 2fd9476..d25097d 100644 (file)
@@ -23,7 +23,7 @@
 .\" the source, must acknowledge the copyright and authors of this work.
 .\" %%%LICENSE_END
 .\"
-.TH PTHREAD_ATTR_SETSCHEDPARAM 3 2012-03-15 "Linux" "Linux Programmer's Manual"
+.TH PTHREAD_ATTR_SETSCHEDPARAM 3 2014-05-21 "Linux" "Linux Programmer's Manual"
 .SH NAME
 pthread_attr_setschedparam, pthread_attr_getschedparam \- set/get
 scheduling parameter attributes in thread attributes object
@@ -33,7 +33,7 @@ scheduling parameter attributes in thread attributes object
 
 .BI "int pthread_attr_setschedparam(pthread_attr_t *" attr ,
 .BI "                               const struct sched_param *" param );
-.BI "int pthread_attr_getschedparam(pthread_attr_t *" attr ,
+.BI "int pthread_attr_getschedparam(const pthread_attr_t *" attr ,
 .BI "                               struct sched_param *" param );
 .sp
 Compile and link with \fI\-pthread\fP.
@@ -70,7 +70,18 @@ struct sched_param {
 As can be seen, only one scheduling parameter is supported.
 For details of the permitted ranges for scheduling priorities
 in each scheduling policy, see
-.BR sched_setscheduler (2).
+.BR sched (7).
+
+In order for the parameter setting made by
+.BR pthread_attr_setschedparam ()
+to have effect when calling
+.BR pthread_create (3),
+the caller must use
+.BR pthread_attr_setinheritsched (3)
+to set the inherit-scheduler attribute of the attributes object
+.I attr
+to
+.BR PTHREAD_EXPLICIT_SCHED .
 .SH RETURN VALUE
 On success, these functions return 0;
 on error, they return a nonzero error number.
@@ -86,6 +97,13 @@ On Linux these functions always succeed
 handle a possible error return).
 .\" .SH VERSIONS
 .\" Available since glibc 2.0.
+.SH ATTRIBUTES
+.SS Multithreading (see pthreads(7))
+The
+.BR pthread_attr_setschedparam ()
+and
+.BR pthread_attr_getschedparam ()
+functions are thread-safe.
 .SH CONFORMING TO
 POSIX.1-2001.
 .SH NOTES
@@ -99,11 +117,20 @@ See
 .ad l
 .nh
 .BR sched_get_priority_min (2),
-.BR sched_setscheduler (2),
 .BR pthread_attr_init (3),
 .BR pthread_attr_setinheritsched (3),
 .BR pthread_attr_setschedpolicy (3),
 .BR pthread_create (3),
 .BR pthread_setschedparam (3),
 .BR pthread_setschedprio (3),
-.BR pthreads (7)
+.BR pthreads (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/.