1pthread_attr_getscope(3C)Standard C Library Functionspthread_attr_getscope(3C)
2
3
4

NAME

6       pthread_attr_getscope,  pthread_attr_setscope  - get or set contention‐
7       scope attribute
8

SYNOPSIS

10       cc -mt [ flag... ] file... -lpthread [ library... ]
11       #include <pthread.h>
12
13       int pthread_attr_getscope(const pthread_attr_t *restrict attr,
14            int *restrict contentionscope);
15
16
17       int pthread_attr_setscope(pthread_attr_t *attr, int contentionscope);
18
19

DESCRIPTION

21       The pthread_attr_setscope() and pthread_attr_getscope()  functions  are
22       used to set and get the contentionscope attribute in the attr object.
23
24
25       The  contentionscope attribute can have the value PTHREAD_SCOPE_SYSTEM,
26       signifying     system     scheduling     contention      scope,      or
27       PTHREAD_SCOPE_PROCESS, signifying process scheduling contention scope.
28
29
30       The  symbols PTHREAD_SCOPE_SYSTEM and PTHREAD_SCOPE_PROCESS are defined
31       by the header <pthread.h>.
32

RETURN VALUES

34       If successful, the pthread_attr_setscope() and  pthread_attr_getscope()
35       functions  return 0. Otherwise, an error number is returned to indicate
36       the error.
37

ERRORS

39       The pthread_attr_setscope(), or pthread_attr_getscope(),  function  may
40       fail if:
41
42       EINVAL    attr or contentionscope is invalid.
43
44

USAGE

46       After  these attributes have been set, a thread can be created with the
47       specified attributes using pthread_create(). Using these routines  does
48       not affect the current running thread.
49

ATTRIBUTES

51       See attributes(5) for descriptions of the following attributes:
52
53
54
55
56       ┌─────────────────────────────┬─────────────────────────────┐
57       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
58       ├─────────────────────────────┼─────────────────────────────┤
59       │Interface Stability          │Standard                     │
60       ├─────────────────────────────┼─────────────────────────────┤
61       │MT-Level                     │MT-Safe                      │
62       └─────────────────────────────┴─────────────────────────────┘
63

SEE ALSO

65       pthread_attr_init(3C),                pthread_attr_setinheritsched(3C),
66       pthread_attr_setschedpolicy(3C),        pthread_attr_setschedparam(3C),
67       pthread_create(3C),   pthread_setschedparam(3C),  attributes(5),  stan‐
68       dards(5)
69
70
71
72SunOS 5.11                        23 Mar 2005        pthread_attr_getscope(3C)
Impressum