.\" the source, must acknowledge the copyright and authors of this work.
.\" %%%LICENSE_END
.\"
-.TH PTHREAD_ATTR_SETSCHEDPARAM 3 2015-02-21 "Linux" "Linux Programmer's Manual"
+.TH PTHREAD_ATTR_SETSCHEDPARAM 3 2017-09-15 "Linux" "Linux Programmer's Manual"
.SH NAME
pthread_attr_setschedparam, pthread_attr_getschedparam \- set/get
scheduling parameter attributes in thread attributes object
.SH SYNOPSIS
.nf
.B #include <pthread.h>
-
+.PP
.BI "int pthread_attr_setschedparam(pthread_attr_t *" attr ,
.BI " const struct sched_param *" param );
.BI "int pthread_attr_getschedparam(const pthread_attr_t *" attr ,
.BI " struct sched_param *" param );
-.sp
+.PP
Compile and link with \fI\-pthread\fP.
.fi
.SH DESCRIPTION
These attributes determine the scheduling parameters of
a thread created using the thread attributes object
.IR attr .
-
+.PP
The
.BR pthread_attr_getschedparam ()
returns the scheduling parameter attributes of the thread attributes object
.IR attr
in the buffer pointed to by
.IR param .
-
+.PP
Scheduling parameters are maintained in the following structure:
-
+.PP
.in +4n
-.nf
+.EX
struct sched_param {
int sched_priority; /* Scheduling priority */
};
-.fi
+.EE
.in
-
+.PP
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 (7).
-
+.PP
In order for the parameter setting made by
.BR pthread_attr_setschedparam ()
to have effect when calling
T} Thread safety MT-Safe
.TE
.SH CONFORMING TO
-POSIX.1-2001.
+POSIX.1-2001, POSIX.1-2008.
.SH NOTES
See
.BR pthread_attr_setschedpolicy (3)
for a list of the thread scheduling policies supported on Linux.
-.SH EXAMPLE
+.SH EXAMPLES
See
.BR pthread_setschedparam (3).
.SH SEE ALSO