Standards / Extensions | C or C++ | Dependencies |
---|---|---|
z/OS UNIX |
both | POSIX(ON) |
#define _OPEN_THREADS
#include <pthread.h>
int pthread_rwlock_destroy(pthread_rwlock_t *rwlock);
#define _UNIX03_THREADS
#include <pthread.h>
int pthread_rwlock_destroy(pthread_rwlock_t *rwlock);
The pthread_rwlock_destroy() function deletes a read or write lock object, which is identified by rwlock and releases any resources used by this read or write lock object. Read/write locks are used to protect shared resources.
If successful, pthread_rwlock_destroy() returns 0.
If unsuccessful, pthread_rwlock_destroy() returns -1 and sets errno to one of the following values:
Special behavior for Single UNIX Specification, Version 3: If unsuccessful, pthread_rwlock_destroy() returns an error number to indicate the error.