initialize a read/write lock
() function is used to
initialize a read/write lock, with attributes specified by
is NULL, the default read/write lock
attributes are used.
The results of calling pthread_rwlock_init
an already initialized lock are undefined.
If successful, the pthread_rwlock_init
will return zero. Otherwise an error number will be returned to indicate the
() function will fail if:
- The system lacked the necessary resources (other than
memory) to initialize the lock.
- Insufficient memory exists to initialize the lock.
- The caller does not have sufficient privilege to perform
() function may fail if:
- The system has detected an attempt to re-initialize the
object referenced by lock, a previously
initialized but not yet destroyed read/write lock.
- The value specified by
attr is invalid.
() function is expected to
conform to Version 2 of the Single UNIX
() function first appeared
in FreeBSD 3.0
The PTHREAD_PROCESS_SHARED attribute is not supported.