Once initialised, the lock can be used any number of times without being re-initialised. Upon successful initialisation, the state of the read-write lock becomes initialised and unlocked. Results are undefined if a read-write lock is used without first being initialised. Attempting to destroy an uninitialised read-write lock results in undefined behaviour. Otherwise, an error number is returned to indicate the error.
Insufficient memory exists to initialise the read-write lock.
The caller does not have the privilege to perform the operation. The value specified by attr is invalid. The implementation has detected an attempt to destroy the object referenced by rwlock while it is locked. The value specified by attr is invalid. In keeping with its objective of ensuring that CAE Specifications are fully aligned with formal standards, The Open Group intends to add any new interfaces adopted by an official IEEE standard in this area.