1 .\" Copyright (c) 2004-2007 Apple Inc. All rights reserved.
6 .Nm pthread_attr_getschedparam ,
7 .Nm pthread_attr_setschedparam
8 .Nd thread attribute operations
10 .Fd #include <pthread.h>
12 .Fo pthread_attr_getschedparam
13 .Fa "const pthread_attr_t *restrict attr"
14 .Fa "struct sched_param *restrict param"
17 .Fo pthread_attr_setschedparam
18 .Fa "pthread_attr_t *restrict attr"
19 .Fa "const struct sched_param *restrict param"
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.
28 .Fn pthread_attr_getschedparam
30 .Fn pthread_attr_setschedparam
31 get and set the scheduling parameters within the
34 .Fd /usr/include/sched.h
36 .Fa struct sched_param .
40 .Fa struct sched_param
41 can be set to SCHED_OTHER, SCHED_FIFO and SCHED_RR.
43 If successful, these functions return 0.
44 Otherwise, an error number is returned to indicate the error.
45 .Fn pthread_attr_getschedparam ,
46 on success, will copy the value of the thread's scheduling parameter attribute
47 to the location pointed to by the second function parameter.
50 .Fn pthread_attr_getschedparam
60 .Fn pthread_attr_setschedparam
73 .Xr pthread_create 3 ,
74 .Xr pthread_attr_init 3 ,
75 .Xr pthread_attr_setinheritsched 3
78 .Fn pthread_attr_setschedparam ,
79 .Fn pthread_attr_getschedparam