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

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10

NAME

12       pthread_attr_getscope, pthread_attr_setscope - get  and  set  the  con‐
13       tentionscope attribute (REALTIME THREADS)
14

SYNOPSIS

16       #include <pthread.h>
17
18       int pthread_attr_getscope(const pthread_attr_t *restrict attr,
19              int *restrict contentionscope);
20       int pthread_attr_setscope(pthread_attr_t *attr, int contentionscope);
21
22

DESCRIPTION

24       The   pthread_attr_getscope()  and  pthread_attr_setscope()  functions,
25       respectively, shall get and set the contentionscope  attribute  in  the
26       attr object.
27
28       The contentionscope attribute may have the values PTHREAD_SCOPE_SYSTEM,
29       signifying     system     scheduling     contention      scope,      or
30       PTHREAD_SCOPE_PROCESS,  signifying process scheduling contention scope.
31       The symbols PTHREAD_SCOPE_SYSTEM and PTHREAD_SCOPE_PROCESS are  defined
32       in the <pthread.h> header.
33

RETURN VALUE

35       If  successful, the pthread_attr_getscope() and pthread_attr_setscope()
36       functions shall return  zero;  otherwise,  an  error  number  shall  be
37       returned to indicate the error.
38

ERRORS

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

EXAMPLES

54       None.
55

APPLICATION USAGE

57       After these attributes have been set, a thread can be created with  the
58       specified  attributes using pthread_create(). Using these routines does
59       not affect the current running thread.
60

RATIONALE

62       None.
63

FUTURE DIRECTIONS

65       None.
66

SEE ALSO

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