pthread_rwlockattr_setpshared

Sets the process-shared attribute in the reader-writer attribute object.

Library:LibC
Classification:POSIX
Service:Synchronization

Syntax

  #include <pthread.h>
   
  int pthread_rwlockattr_setpshared (
     pthread_rwlockattr_t   *attr,
     int                     pshared);
  

Parameters

attr

(IN) Points to the reader-writer attribute object.

pshared

(IN) Specifies the value for the process-shared attribute. For a list of supported values, see Section 48.1.2, Process Shared Flags.

Return Values

If successful, returns 0. Otherwise, returns one of the following values.

Decimal

Constant

Description

9

EINVAL

The pshared parameter is invalid.

79

ENOTSUP

The pshared parameter is set to an unsupported value.

Remarks

The pthread_rwlockxattr_destroy function destroys an unused reader-writer attribute object.

See Also