|
Syntax #include <pthread.h> int pthread_rwlockattr_init(pthread_rwlockattr_t *attr); Threadsafe: Yes Signal Safe: Yes |
The pthread_rwlockattr_init() function initializes the read/write lock attributes object referenced by attr to the default attributes. The read/write lock attributes object can be used in a call to pthread_rwlock_init() to create a read/write lock.
| Attribute | Default value | supported values |
|---|---|---|
| pshared | PTHREAD_PROCESS_PRIVATE | PTHREAD_PROCESS_PRIVATE or PTHREAD_PROCESS_SHARED |
None.
If pthread_rwlockattr_init() was not successful, the error condition returned usually indicates one of the following errors. Under some conditions, the value returned could indicate an error other than those listed here.