SYNOPSIS
#include <pthread.h>
int pthread_mutexattr_setpshared(pthread_mutexattr_t *attr, int pshared);
DESCRIPTION
The
- PTHREAD_PROCESS_PRIVATE
-
Creates a mutex that can only be used to synchronize threads within the current process.
- PTHREAD_PROCESS_SHARED
-
Creates a mutex that can be used to synchronize threads within all processes on the system
PARAMETERS
- attr
-
Is the mutex attribute object.
- pshared
-
Is the mutex process-shared state attribute value; one of the values specified in the DESCRIPTION section.
RETURN VALUES
On success,
- EINVAL
-
attr is not an initialized mutex attribute object, or pshared is not a valid process-shared state setting.
- EFAULT
-
attr is an invalid pointer.
- ENOTSUP
-
pshared was set to PTHREAD_PROCESS_SHARED.
CONFORMANCE
POSIX P1003.1 (1996)
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.4 Documentation Build 39.