Purpose
This function is used to set the process-shared attribute in an initialized
read-write lock attributes object specified by the argument
rwattr.
Class
Function
Argument Type and Attributes
- rwattr
- TYPE(f_pthread_rwlockattr_t), INTENT(INOUT)
- pshared
- INTEGER(4), INTENT(IN)
Must be one of the following:
- PTHREAD_PROCESS_SHARED
- Specifies the read-write lock can be operated upon 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 the read-write lock shall only be used by threads within the
same process as the thread that created it. 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 one of the following errors.
- EINVAL
- The argument rwattr is invalid.
- ENOSYS
- The value of pshared is equal to
pthread_process_shared.
