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 must be within the range returned by the
42 .Xr sched_get_priority_min 2
44 .Xr sched_get_priority_max 2
47 If successful, these functions return 0.
48 Otherwise, an error number is returned to indicate the error.
49 .Fn pthread_attr_getschedparam ,
50 on success, will copy the value of the thread's scheduling parameter attribute
51 to the location pointed to by the second function parameter.
54 .Fn pthread_attr_getschedparam
64 .Fn pthread_attr_setschedparam
77 .Xr pthread_create 3 ,
78 .Xr pthread_attr_init 3 ,
79 .Xr pthread_attr_setinheritsched 3
82 .Fn pthread_attr_setschedparam ,
83 .Fn pthread_attr_getschedparam