Return Value
If successful, pthread_rwlock_init() returns zero. Otherwise, an error number is returned to indicate the error.
If pthread_rwlock_init() fails, rwlock is not initialized and the contents of rwlock are undefined.
-
EINVAL
-
The value specified by attr or rwlockis invalid.