1 .\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk
2 .\" <mtk.manpages@gmail.com>
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date. The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein. The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
24 .TH PTHREAD_ATTR_SETSCHEDPOLICY 3 2010-02-03 "Linux" "Linux Programmer's Manual"
26 pthread_attr_setschedpolicy, pthread_attr_getschedpolicy \- set/get
27 scheduling policy attribute in thread attributes object
30 .B #include <pthread.h>
32 .BI "int pthread_attr_setschedpolicy(pthread_attr_t *" attr \
34 .BI "int pthread_attr_getschedpolicy(pthread_attr_t *" attr \
37 Compile and link with \fI\-pthread\fP.
40 .BR pthread_attr_setschedpolicy ()
41 function sets the scheduling policy attribute of the
42 thread attributes object referred to by
44 to the value specified in
46 This attribute determines the scheduling policy of
47 a thread created using the thread attributes object
50 The supported values for
57 with the semantics described in
58 .BR sched_setscheduler (2).
59 .\" FIXME . pthread_setschedparam() places no restriction on the policy,
60 .\" but pthread_attr_setschedpolicy() restricts policy to RR/FIFO/OTHER
61 .\" http://sourceware.org/bugzilla/show_bug.cgi?id=7013
64 .BR pthread_attr_getschedpolicy ()
65 returns the scheduling policy attribute of the thread attributes object
67 in the buffer pointed to by
70 On success, these functions return 0;
71 on error, they return a nonzero error number.
73 .BR pthread_attr_setschedpolicy ()
74 can fail with the following error:
80 POSIX.1-2001 also documents an optional
82 error ("attempt was made to set the attribute to an unsupported value") for
83 .BR pthread_attr_setschedpolicy ().
85 .\" Available since glibc 2.0.
90 .BR pthread_setschedparam (3).
92 .BR sched_setscheduler (2),
93 .BR pthread_attr_init (3),
94 .BR pthread_attr_setinheritsched (3),
95 .BR pthread_attr_setschedparam (3),
96 .BR pthread_create (3),
97 .BR pthread_setschedparam (3),
98 .BR pthread_setschedprio (3),