pthread_mutexattr_getpshared Subroutine Purpose Returns the value of the process-shared attribute of a mutex attributes object. Note: This subroutine is not implemented in AIX. It always returns ENOSYS. Library Threads Library (libpthreads.a) Syntax #include int pthread_mutexattr_getpshared (attr, pshared) const pthread_mutexattr_t *attr; int *pshared; Description The pthread_mutexattr_getpshared subroutine returns the value of the process-shared attribute of the mutex attributes object attr. This attribute specifies the process sharing of the mutex created with this attributes object. It may have one of the following values: PTHREAD_PROCESS_SHARED Specifies that the mutex can be used by any thread that has access to the memory where it is allocated, even if these threads belong to different processes. PTHREAD_PROCESS_PRIVATE Specifies that the mutex shall only be used by threads within the same process as the thread that created it. This is the default value. Note: The pthread.h header file must be the first included file of each source file using the threads library. Parameters attr Specifies the mutex attributes object. pshared Points to where the pshared attribute value will be stored. Return Values Upon successful completion, the value of the pshared attribute is returned via the pshared parameter, and 0 is returned. Otherwise, an error code is returned. Error Codes The pthread_mutexattr_getpshared subroutine is unsuccessful if the following is true: EINVAL The attr parameter is not valid. ENOSYS The process sharing POSIX option is not implemented. Implementation Specifics This subroutine is part of the Base Operating System (BOS) Runtime. The implementation of this subroutine is dependent on the process sharing POSIX option. The process sharing POSIX option is not implemented in AIX. Related Information The pthread_mutexattr_setpshared subroutine, pthread_mutexattr_init subroutine. Advanced Attributes. Threads Library Options and Threads Library Quick Reference.