DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

rwlock_destroy(3synch)


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

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(3synch), rwlock(3synch), rwlock_init(3synch), rw_rdlock(3synch), rw_tryrdlock(3synch), rw_trywrlock(3synch), rw_unlock(3synch), rw_wrlock(3synch)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004