Destroy a read-write lock
#include <pthread.h> int pthread_rwlock_destroy( pthread_rwlock_t* rwl );
libc
The pthread_rwlock_destroy() function destroys the read-write lock referenced by rwl and releases the system resources used by the lock. The read-write lock shouldn't be destroyed until all shared locks and exclusive locks are inactive and no threads are blocked waiting for a shared or exclusive lock.
After being successfully destroyed, a read-write lock shouldn't be reused until it's reinitialized using pthread_rwlock_init().
| Safety: | |
|---|---|
| Cancellation point | No |
| Interrupt handler | No |
| Signal handler | Yes |
| Thread | Yes |
pthread_rwlock_init() pthread_rwlock_rdlock(), pthread_rwlock_tryrdlock(), pthread_rwlock_trywrlock(), pthread_rwlock_unlock(), pthread_rwlock_wrlock()