1
by Francesco Paolo Lovergine
rules: linking manpages-posix not manpages. |
1 |
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved |
2
by Francesco Paolo Lovergine
* Alligned to linux main manpages edition. |
2 |
.TH "PTHREAD_ATTR_GETSCOPE" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual" |
1
by Francesco Paolo Lovergine
rules: linking manpages-posix not manpages. |
3 |
.\" pthread_attr_getscope |
4 |
.SH NAME |
|
5 |
pthread_attr_getscope, pthread_attr_setscope \- get and set the contentionscope
|
|
6 |
attribute (\fBREALTIME
|
|
7 |
THREADS\fP)
|
|
8 |
.SH SYNOPSIS |
|
9 |
.LP
|
|
10 |
\fB#include <pthread.h>
|
|
11 |
.br
|
|
12 |
.sp
|
|
13 |
int pthread_attr_getscope(const pthread_attr_t *restrict\fP \fIattr\fP\fB, |
|
14 |
.br
|
|
15 |
\ \ \ \ \ \ int *restrict\fP \fIcontentionscope\fP\fB); |
|
16 |
.br
|
|
17 |
int pthread_attr_setscope(pthread_attr_t *\fP\fIattr\fP\fB, int\fP |
|
18 |
\fIcontentionscope\fP\fB); \fP |
|
19 |
\fB
|
|
20 |
.br
|
|
21 |
\fP
|
|
22 |
.SH DESCRIPTION |
|
23 |
.LP
|
|
24 |
The \fIpthread_attr_getscope\fP() and \fIpthread_attr_setscope\fP() |
|
25 |
functions, respectively, shall get and set the |
|
26 |
\fIcontentionscope\fP attribute in the \fIattr\fP object. |
|
27 |
.LP
|
|
28 |
The \fIcontentionscope\fP 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 |
|
32 |
are defined in the \fI<pthread.h>\fP header. |
|
33 |
.SH RETURN VALUE |
|
34 |
.LP
|
|
35 |
If successful, the \fIpthread_attr_getscope\fP() and \fIpthread_attr_setscope\fP() |
|
36 |
functions shall return zero; otherwise, an |
|
37 |
error number shall be returned to indicate the error. |
|
38 |
.SH ERRORS |
|
39 |
.LP
|
|
40 |
The \fIpthread_attr_setscope\fP() function may fail if: |
|
41 |
.TP 7 |
|
42 |
.B EINVAL |
|
43 |
The value of \fIcontentionscope\fP is not valid. |
|
44 |
.TP 7 |
|
45 |
.B ENOTSUP |
|
46 |
An attempt was made to set the attribute to an unsupported value. |
|
47 |
.sp
|
|
48 |
.LP
|
|
49 |
These functions shall not return an error code of [EINTR]. |
|
50 |
.LP
|
|
51 |
\fIThe following sections are informative.\fP |
|
52 |
.SH EXAMPLES |
|
53 |
.LP
|
|
54 |
None. |
|
55 |
.SH APPLICATION USAGE |
|
56 |
.LP
|
|
57 |
After these attributes have been set, a thread can be created with |
|
58 |
the specified attributes using \fIpthread_create\fP(). Using these |
|
59 |
routines does not affect the current running |
|
60 |
thread. |
|
61 |
.SH RATIONALE |
|
62 |
.LP
|
|
63 |
None. |
|
64 |
.SH FUTURE DIRECTIONS |
|
65 |
.LP
|
|
66 |
None. |
|
67 |
.SH SEE ALSO |
|
68 |
.LP
|
|
69 |
\fIpthread_attr_destroy\fP() , \fIpthread_attr_getinheritsched\fP() |
|
70 |
, \fIpthread_attr_getschedpolicy\fP() , \fIpthread_attr_getschedparam\fP() |
|
71 |
, \fIpthread_create\fP() , the Base Definitions volume of IEEE\ Std\ 1003.1-2001, |
|
72 |
\fI<pthread.h>\fP, \fI<sched.h>\fP |
|
73 |
.SH COPYRIGHT |
|
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 at |
|
82 |
http://www.opengroup.org/unix/online.html . |