This is the mail archive of the pthreads-win32@sources.redhat.com mailing list for the pthreas-win32 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: mutexes


Win32 mutexes are recursive by default!

i.e. the thread that owns the lock can re-acquire the lock...
     you have to have as many unlocks as locks....


-----Original Message-----
From: uGAH man [mailto:snake@drinkordie.com]
Sent: Friday, July 21, 2000 3:18 PM
To: pthread
Subject: mutexes


i was testing this pthread for win32 in my prog.
when i checked if it was blocking mutex_lock calls, i was surprised when it
didnt lock

pthread_mutex_t DBlock;

pthread_mutex_init( &DBlock, NULL );
pthread_mutex_lock( &DBlock );
pthread_mutex_lock( &DBlock );

^^ these two calls didnt block

im wondering, why ?
could anyone help ?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]