1 .\" Copyright (c) 2004-2007 Apple Inc. All rights reserved.
6 .Nm pthread_attr_getschedpolicy ,
7 .Nm pthread_attr_setschedpolicy
8 .Nd thread attribute operations
10 .Fd #include <pthread.h>
12 .Fo pthread_attr_getschedpolicy
13 .Fa "const pthread_attr_t *restrict attr"
14 .Fa "int *restrict policy"
17 .Fo pthread_attr_setschedpolicy
18 .Fa "pthread_attr_t *attr"
22 Thread attributes are used to specify parameters to
24 One attribute object can be used in multiple calls to
26 with or without modifications between calls.
29 .Fn pthread_attr_setschedpolicy
31 .Fn pthread_attr_getschedpolicy ,
32 set and get the attribute in the
34 argument related to the scheduling policy.
35 The value for the aforementioned attribute can be SCHED_FIFO, SCHED_RR and SCHED_OTHER.
37 If successful, these functions return 0.
38 Otherwise, an error number is returned to indicate the error.
39 .Fn pthread_attr_getschedpolicy ,
40 on success, will copy the value of the thread's scheduling policy attribute
41 to the location pointed to by the second function parameter.
44 .Fn pthread_attr_getschedpolicy
53 .Fn pthread_attr_setschedpolicy
61 Invalid or unsupported value for
65 .Xr pthread_create 3 ,
66 .Xr pthread_attr_init 3 ,
67 .Xr pthread_attr_setschedparam 3 ,
68 .Xr pthread_attr_setinheritsched 3
70 .Fn pthread_attr_setschedpolicy ,
71 .Fn pthread_attr_getschedpolicy