Purpose
This function is used to set the process-shared attribute of the mutex
attributes object identified by the argument mattr.
Class
Function
Argument Type and Attributes
- mattr
- TYPE(f_pthread_mutexattr_t), INTENT(INOUT)
- pshared
-
INTEGER(4), INTENT(IN)
Must contain one of the following values:
- PTHREAD_PROCESS_SHARED
- Specifies the mutex can be operated upon by any thread that has access to
the memory where the mutex is allocated, even if the mutex is allocated in
memory that is shared by multiple processes.
- PTHREAD_PROCESS_PRIVATE
- Specifies the mutex will only be operated upon by threads created within
the same process as the thread that initialized the mutex. This is the
default setting of the attribute.
Result Type and Attributes
INTEGER(4)
Result Value
On successful completion, this function returns 0. Otherwise,
this function returns the following error.
- EINVAL
- The argument is invalid.
