1 .\" Copyright (c) 2004-2007 Apple Inc. All rights reserved.
6 .Nm pthread_attr_getinheritsched ,
7 .Nm pthread_attr_setinheritsched
8 .Nd thread attribute operations
10 .Fd #include <pthread.h>
12 .Fo pthread_attr_getinheritsched
13 .Fa "const pthread_attr_t *restrict attr"
14 .Fa "int *restrict inheritsched"
17 .Fo pthread_attr_setinheritsched
18 .Fa "pthread_attr_t *attr"
19 .Fa "int inheritsched"
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 One of the thread attributes of interest is the "inheritsched" attribute. This attribute
29 controls the scheduling policy and related attributes of the newly created thread. The values of the
30 "inheritsched" attribute can be either PTHREAD_INHERIT_SCHED or PTHREAD_EXPLICIT_SCHED.
34 Indicates that the newly created thread should inherit all it's scheduling related attributes from it's creating
35 thread. It ignores the values of the relevant attributes within the
39 PTHREAD_EXPLICIT_SCHED
41 Indicates that the newly created thread should set it's scheduling related attributes based on
46 .Fn pthread_attr_setinheritsched
47 functions set the "inheritsched" attribute within the
49 argument to the desired value.
52 .Fn pthread_attr_getinheritsched
53 functions copy the value of the "inheritsched" attribute to the location pointed to by the second function parameter.
55 If successful, these functions return 0.
56 Otherwise, an error number is returned to indicate the error.
59 .Fn pthread_attr_getinheritsched
68 .Fn pthread_attr_setinheritsched
77 .Xr pthread_create 3 ,
78 .Xr pthread_attr_init 3 ,
79 .Xr pthread_attr_setschedparam 3
82 .Fn pthread_attr_setinheritsched ,
83 .Fn pthread_attr_getinheritsched