int
pthread_rwlock_init(
pthread_rwlock_t * restrict lock
, const pthread_rwlockattr_t * restrict attr
)
)
function is used to initialize a read/write lock, with attributes
specified by
attr
.
If
attr
is NULL, the default read/write lock attributes are used.
The results of calling
pthread_rwlock_init()
with an already initialized lock are undefined.
)
function will return zero.
Otherwise an error number will be returned to indicate the error.
)
function shall fail if:
EAGAIN
]
ENOMEM
]
The
pthread_rwlock_init()
function may fail if:
EBUSY
]
lock
,
a previously initialized but not yet destroyed read/write lock.
EINVAL
]
attr
is invalid.
)
conforms to
ISO/IEC 9945-1:1996 (``POSIX.1'') .