DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

rwlock_destroy(SYNCH)


rwlock_destroy -- destroy a reader-writer lock

Synopsis

   cc [options] -Kthread file
   

#include <synch.h>

int rwlock_destroy(rwlock_t *lock);

Description

rwlock_destroy destroys the reader-writer lock pointed to by lock. This includes invalidating the lock and freeing any associated dynamically allocated resources.

lock must previously have been initialized (see rwlock_init(SYNCH)).

Parameters


lock
pointer to the lock to be destroyed

Return values

rwlock_destroy returns zero for success and an error number for failure.

Errors

If any of the following conditions is detected, rwlock_destroy returns the corresponding value:

EBUSY
lock is locked or another thread is waiting to acquire lock

EINVAL
invalid argument specified

References

Intro(SYNCH), rwlock(SYNCH), rwlock_init(SYNCH), rw_rdlock(SYNCH), rw_tryrdlock(SYNCH), rw_trywrlock(SYNCH), rw_unlock(SYNCH), rw_wrlock(SYNCH)
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 - 01 June 2005