1 .\" Copyright (c) 2004-2007 Apple Inc. All rights reserved.
6 .Nm pthread_attr_getscope ,
7 .Nm pthread_attr_setscope
8 .Nd thread attribute operations
10 .Fd #include <pthread.h>
12 .Fo pthread_attr_getscope
13 .Fa "const pthread_attr_t *restrict attr"
14 .Fa "int *restrict contentionscope"
17 .Fo pthread_attr_setscope
18 .Fa "pthread_attr_t *attr"
19 .Fa "int contentionscope"
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_setscope
31 .Fn pthread_attr_getscope
32 functions, respectively, set and get the attribute within
34 argument that controls the contention scope of the thread.
35 The acceptable values are PTHREAD_SCOPE_SYSTEM, indicating a scheduling contention scope that
36 is system-wide, and PTHREAD_SCOPE_PROCESS, which indicates a process scheduling contention scope.
37 Currently on Mac OS X we only support PTHREAD_SCOPE_SYSTEM.
39 If successful, these functions return 0.
40 Otherwise, an error number is returned to indicate the error.
43 .Fn pthread_attr_getscope
53 .Fn pthread_attr_setscope
62 Invalid or unsupported value for
66 .Xr pthread_create 3 ,
67 .Xr pthread_attr_init 3 ,
68 .Xr pthread_attr_setinheritsched 3 ,
69 .Xr pthread_attr_setschedpolicy 3 ,
70 .Xr pthread_attr_setschedparam 3
72 .Fn pthread_attr_setscope ,
73 .Fn pthread_attr_getscope