1PTHREAD_ATTR_GETSCOPE(P)   POSIX Programmer's Manual  PTHREAD_ATTR_GETSCOPE(P)
2
3
4

NAME

6       pthread_attr_getscope,  pthread_attr_setscope  -  get  and set the con‐
7       tentionscope attribute (REALTIME THREADS)
8

SYNOPSIS

10       #include <pthread.h>
11
12       int pthread_attr_getscope(const pthread_attr_t *restrict attr,
13              int *restrict contentionscope);
14       int pthread_attr_setscope(pthread_attr_t *attr, int contentionscope);
15
16

DESCRIPTION

18       The  pthread_attr_getscope()  and  pthread_attr_setscope()   functions,
19       respectively,  shall  get  and set the contentionscope attribute in the
20       attr object.
21
22       The contentionscope attribute may have the values PTHREAD_SCOPE_SYSTEM,
23       signifying      system      scheduling     contention     scope,     or
24       PTHREAD_SCOPE_PROCESS, signifying process scheduling contention  scope.
25       The  symbols PTHREAD_SCOPE_SYSTEM and PTHREAD_SCOPE_PROCESS are defined
26       in the <pthread.h> header.
27

RETURN VALUE

29       If successful, the pthread_attr_getscope() and  pthread_attr_setscope()
30       functions  shall  return  zero;  otherwise,  an  error  number shall be
31       returned to indicate the error.
32

ERRORS

34       The pthread_attr_setscope() function may fail if:
35
36       EINVAL The value of contentionscope is not valid.
37
38       ENOTSUP
39              An attempt was made to  set  the  attribute  to  an  unsupported
40              value.
41
42
43       These functions shall not return an error code of [EINTR].
44
45       The following sections are informative.
46

EXAMPLES

48       None.
49

APPLICATION USAGE

51       After  these attributes have been set, a thread can be created with the
52       specified attributes using pthread_create(). Using these routines  does
53       not affect the current running thread.
54

RATIONALE

56       None.
57

FUTURE DIRECTIONS

59       None.
60

SEE ALSO

62       pthread_attr_destroy()      ,      pthread_attr_getinheritsched()     ,
63       pthread_attr_getschedpolicy()    ,    pthread_attr_getschedparam()    ,
64       pthread_create() , the Base Definitions volume of IEEE Std 1003.1-2001,
65       <pthread.h>, <sched.h>
66
68       Portions of this text are reprinted and reproduced in  electronic  form
69       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
70       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
71       Specifications  Issue  6,  Copyright  (C) 2001-2003 by the Institute of
72       Electrical and Electronics Engineers, Inc and The Open  Group.  In  the
73       event of any discrepancy between this version and the original IEEE and
74       The Open Group Standard, the original IEEE and The Open Group  Standard
75       is  the  referee document. The original Standard can be obtained online
76       at http://www.opengroup.org/unix/online.html .
77
78
79
80IEEE/The Open Group                  2003             PTHREAD_ATTR_GETSCOPE(P)
Impressum