1PTHREAD_RWLOCKATTR_GETPSHAREPDO(S3IPX)Programmer'sPMTaHnRuEaAlD_RWLOCKATTR_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_rwlockattr_getpshared, pthread_rwlockattr_setpshared - get  and
13       set  the  process-shared  attribute  of  the read-write lock attributes
14       object
15

SYNOPSIS

17       #include <pthread.h>
18
19       int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *
20              restrict attr, int *restrict pshared);
21       int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *attr,
22              int pshared);
23
24

DESCRIPTION

26       The pthread_rwlockattr_getpshared() function shall obtain the value  of
27       the  process-shared  attribute  from  the initialized attributes object
28       referenced by attr. The pthread_rwlockattr_setpshared() function  shall
29       set  the  process-shared  attribute in an initialized attributes object
30       referenced by attr.
31
32       The process-shared attribute shall be set to PTHREAD_PROCESS_SHARED  to
33       permit  a  read-write  lock  to be operated upon by any thread that has
34       access to the memory where the read-write lock is  allocated,  even  if
35       the  read-write  lock is allocated in memory that is shared by multiple
36       processes. If the process-shared attribute is  PTHREAD_PROCESS_PRIVATE,
37       the  read-write  lock  shall  only  be operated upon by threads created
38       within the same process as the thread that initialized  the  read-write
39       lock;  if  threads  of differing processes attempt to operate on such a
40       read-write lock, the behavior is undefined. The default  value  of  the
41       process-shared attribute shall be PTHREAD_PROCESS_PRIVATE.
42
43       Additional attributes, their default values, and the names of the asso‐
44       ciated functions to get and set those attribute values are  implementa‐
45       tion-defined.
46

RETURN VALUE

48       Upon  successful  completion, the pthread_rwlockattr_getpshared() func‐
49       tion shall return zero  and  store  the  value  of  the  process-shared
50       attribute  of attr into the object referenced by the pshared parameter.
51       Otherwise, an error number shall be returned to indicate the error.
52
53       If  successful,  the  pthread_rwlockattr_setpshared()  function   shall
54       return  zero;  otherwise, an error number shall be returned to indicate
55       the error.
56

ERRORS

58       The pthread_rwlockattr_getpshared() and pthread_rwlockattr_setpshared()
59       functions may fail if:
60
61       EINVAL The value specified by attr is invalid.
62
63
64       The pthread_rwlockattr_setpshared() function may fail if:
65
66       EINVAL The  new  value specified for the attribute is outside the range
67              of legal values for that attribute.
68
69
70       These functions shall not return an error code of [EINTR].
71
72       The following sections are informative.
73

EXAMPLES

75       None.
76

APPLICATION USAGE

78       None.
79

RATIONALE

81       None.
82

FUTURE DIRECTIONS

84       None.
85

SEE ALSO

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