Index of Section 2 Manual Pages
| Interix / SUA | pthread_rwlockattr_getpshared.2 | Interix / SUA |
pthread_rwlockattr_getpshared(2) pthread_rwlockattr_getpshared(2)
pthread_rwlockattr_getpshared()
NAME
pthread_rwlockattr_getpshared(), pthread_rwlockattr_setpshared() - get or
set the process-shared attribute in a read-write lock attributes object
SYNOPSIS
#include
int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *attr,
int *pshared);
int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *attr,
int pshared);
DESCRIPTION
The pthread_rwlockattr_setpshared(2) function sets the process-shared
attribute in the read-write lock attributes object referenced by the attr
argument to the value specified in the pshared argument. When the process-
shared attribute is set to PTHREAD_PROCESS_SHARED, the read-write lock can
be acted upon by any thread that can access the memory where the read-
write lock object is stored, even if the read-write lock object is
allocated in memory shared by multiple processes. When the process-shared
attribute is set to PTHREAD_PROCESS_PRIVATE (the default), the read-write
lock can be acted upon only by threads that have been created in the same
process as the thread that initialized the read-write lock object.
The pthread_rwlockattr_getpshared(2) function retrieves the process-shared
attribute in the read-write lock attributes object referenced by attr,
storing the value in the location referenced by the pshared argument.
IMPLEMENTATION ISSUES
In this version of Interix, this function supports only the
PTHREAD_PROCESS_PRIVATE process-shared attribute.
RETURN VALUES
On success, both functions return 0; otherwise, an error code is returned.
ERRORS
Both functions can fail for the following reasons:
[EINVAL]
The attr argument is invalid, or the pshared argument is out of range.
This function does not return [EINTR].
SEE ALSO
pthread_rwlock_destroy(2)
pthread_rwlockattr_destroy(2)
USAGE NOTES
All of these functions are thread safe.
None of these functions are async-signal safe.