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


tis_rwlock_init

Initializes readers/writer lock.

Syntax

tis_rwlock_init(
                lock );
 


Argument Data Type Access

lock opaque tis_rwlock_t write


C Binding

#include 

int tis_rwlock_init ( tis_rwlock_t *lock);

Arguments

lock
Address of a readers/writer lock structure.

Description

This routine should be called to initialize a readers/writer lock. The routine initializes the tis_rwlock_t structure that holds the lock states. To destroy a lock, call the tis_rwlock_destroy routine.

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. [EINVAL] The value specified by lock is invalid. [ENOMEM] Insufficient memory exists to establish lock.


Associated Routines

   tis_read_lock
   tis_read_trylock
   tis_read_unlock
   tis_rwlock_destroy
   tis_write_lock
   tis_write_trylock
   tis_write_unlock



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