[Return to Bookshelf] [Contents] [Previous Section] [Next Section] [Index] [Help]


tis_rwlock_destroy

Destroys a readers/writer lock.

Syntax

tis_rwlock_destroy(
                   lock );
 


Argument Data Type Access

lock opaque tis_rwlock_t write


C Binding

#include 

int tis_rwlock_destroy ( tis_rwlock_t *lock);

Arguments

lock
Address of the readers/writer lock structure to be destroyed.

Description

This routine destroys a readers/writer lock. The routine has the reverse operation of the tis_rwlock_init routine, which began the session by initializing the tis_rwlock_t structure. Ensure that there are no locks granted, or threads waiting for locks to be granted, prior to calling this routine. This routine should be called only after the readers and writer are done using the lock.

Return Values

If an error condition occurs, this routine returns an integer value indicating the type of error. Possible return values are as follows:
Return        Description

0 Successful completion. [EBUSY] The lock is in use.


Associated Routines

   tis_read_lock
   tis_read_trylock
   tis_read_unlock
   tis_rwlock_init
   tis_write_lock
   tis_write_trylock
   tis_write_unlock



[Return to Bookshelf] [Contents] [Previous Section] [Next Section] [Index] [Help]