[Previous] [Contents] [Next]

pthread_rwlock_destroy()

Destroy a read-write lock

Synopsis:

#include <pthread.h>

int pthread_rwlock_destroy( pthread_rwlock_t* rwl );

Library:

libc

Description:

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().

Returns:

EOK
Success.
EBUSY
The read-write lock rwl is still in use. The behavior of this read-write lock is now undefined.

Classification:

Standard Unix

Safety:
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

See also:

pthread_rwlock_init() pthread_rwlock_rdlock(), pthread_rwlock_tryrdlock(), pthread_rwlock_trywrlock(), pthread_rwlock_unlock(), pthread_rwlock_wrlock()


[Previous] [Contents] [Next]