This is the mail archive of the
pthreads-win32@sources.redhat.com
mailing list for the pthreas-win32 project.
RE: mutexes
- To: 'uGAH man' <snake at drinkordie dot com>, pthread <pthreads-win32 at sourceware dot cygnus dot com>
- Subject: RE: mutexes
- From: "Bossom, John" <John dot Bossom at Cognos dot COM>
- Date: Mon, 24 Jul 2000 10:59:37 -0400
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 ?