SYNOPSIS
#include <pthread.h>
int pthread_rwlockattr_getpshared(const pthread_rwlockattr_t *restrict attr, int *restrict pshared);
int pthread_rwlockattr_setpshared(pthread_rwlockattr_t *attr, int pshared);
DESCRIPTION
The
The process-shared attribute is set to PTHREAD_PROCESS_SHARED to allow any thread with access to the memory where the read-write lock is allocated to operate on the read-write lock, even if multiple processes share that memory. If the process-shared attribute is PTHREAD_PROCESS_PRIVATE, only threads created within the same process as the process that initialized the read-write lock may operate the read-write lock. The process-shared attribute has a default value of PTHREAD_PROCESS_PRIVATE.
PARAMETERS
- attr
-
Points to a read-write lock attributes object.
- pshared
-
Stores the value of the process-shared attribute.
RETURN VALUES
On success, the
- EINVAL
-
The attr argument points to an invalid value or the new value specified for the attribute is outside the range of legal values for that attribute.
CONFORMANCE
UNIX 03.
MULTITHREAD SAFETY LEVEL
MT-Safe.
PORTING ISSUES
The PTHREAD_PROCESS_SHARED process-shared state is not currently supported; if this value is specified, the function returns ENOTSUP.
AVAILABILITY
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
PTC MKS Toolkit 10.5 Documentation Build 40.