1PTHREAD_BARRIERATTR_GETPSHARPEODS(I3XP)Programmer'sPTMHaRnEuAaDl_BARRIERATTR_GETPSHARED(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_barrierattr_getpshared,  pthread_barrierattr_setpshared  -  get
13       and  set  the process-shared attribute of the barrier attributes object
14       (ADVANCED REALTIME THREADS)
15

SYNOPSIS

17       #include <pthread.h>
18
19
20
21       int pthread_barrierattr_getpshared(const pthread_barrierattr_t *
22              restrict attr, int *restrict pshared);
23       int pthread_barrierattr_setpshared(pthread_barrierattr_t *attr,
24              int pshared);
25
26

DESCRIPTION

28       The pthread_barrierattr_getpshared() function shall obtain the value of
29       the  process-shared  attribute from the attributes object referenced by
30       attr.  The  pthread_barrierattr_setpshared()  function  shall  set  the
31       process-shared attribute in an initialized attributes object referenced
32       by attr.
33
34       The process-shared attribute is set to PTHREAD_PROCESS_SHARED to permit
35       a barrier to be operated upon by any thread that has access to the mem‐
36       ory where the barrier is allocated. If the process-shared attribute  is
37       PTHREAD_PROCESS_PRIVATE,  the  barrier  shall  only be operated upon by
38       threads created within the same process as the thread that  initialized
39       the  barrier;  if  threads of different processes attempt to operate on
40       such a barrier, the behavior is undefined. The  default  value  of  the
41       attribute    shall    be    PTHREAD_PROCESS_PRIVATE.   Both   constants
42       PTHREAD_PROCESS_SHARED  and  PTHREAD_PROCESS_PRIVATE  are  defined   in
43       <pthread.h>.
44
45       Additional attributes, their default values, and the names of the asso‐
46       ciated functions to get and set those attribute values are  implementa‐
47       tion-defined.
48

RETURN VALUE

50       If  successful,  the  pthread_barrierattr_getpshared()  function  shall
51       return zero and store the value of the process-shared attribute of attr
52       into  the  object  referenced  by  the pshared parameter. Otherwise, an
53       error number shall be returned to indicate the error.
54
55       If  successful,  the  pthread_barrierattr_setpshared()  function  shall
56       return  zero;  otherwise, an error number shall be returned to indicate
57       the error.
58

ERRORS

60       These functions may fail if:
61
62       EINVAL The value specified by attr is invalid.
63
64
65       The pthread_barrierattr_setpshared() function may fail if:
66
67       EINVAL The new value specified for the process-shared attribute is  not
68              one    of    the    legal   values   PTHREAD_PROCESS_SHARED   or
69              PTHREAD_PROCESS_PRIVATE.
70
71
72       These functions shall not return an error code of [EINTR].
73
74       The following sections are informative.
75

EXAMPLES

77       None.
78

APPLICATION USAGE

80       The  pthread_barrierattr_getpshared()   and   pthread_barrierattr_setp‐
81       shared() functions are part of the Barriers option and need not be pro‐
82       vided on all implementations.
83

RATIONALE

85       None.
86

FUTURE DIRECTIONS

88       None.
89

SEE ALSO

91       pthread_barrier_destroy(), pthread_barrierattr_destroy(),  pthread_bar‐
92       rierattr_init(),  the  Base Definitions volume of IEEE Std 1003.1-2001,
93       <pthread.h>
94
96       Portions of this text are reprinted and reproduced in  electronic  form
97       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
98       -- Portable Operating System Interface (POSIX),  The  Open  Group  Base
99       Specifications  Issue  6,  Copyright  (C) 2001-2003 by the Institute of
100       Electrical and Electronics Engineers, Inc and The Open  Group.  In  the
101       event of any discrepancy between this version and the original IEEE and
102       The Open Group Standard, the original IEEE and The Open Group  Standard
103       is  the  referee document. The original Standard can be obtained online
104       at http://www.opengroup.org/unix/online.html .
105
106
107
108IEEE/The Open Group                  2003   PTHREAD_BARRIERATTR_GETPSHARED(3P)
Impressum