yw_lock_init

Name

yw_lock_init -- initialize YwLock structure

Synopsis


     #include <yw/lock.h>
   

void yw_lock_init(YwLock *l);

DESCRIPTION

This function initializes YwLock pointed to by l parameter. YwLock is kind of mutual exclusion device a.k.a. mutex. LibYW implements read/write (or shared/exclusive) locks. I.e. just one thread can hold write lock on given mutex, but when no thread holds write lock, any number of threads can hold read lock. {note} In current implementation locks are implemented on the base of pthread mutexes. When they are not available, locking won't work (i.e. locking will always suceed). As a result -- no function in LibYW will be multithread safe.

SEE ALSO

pthread_mutex_init (3),

INFO

Generated from: lock.c,v 1.4 2001/05/04 11:04:23 malekith Exp.