use count=0 instead of 1 for recursive mutex with only one lock reference
authorRich Felker <dalias@aerifal.cx>
Mon, 3 Oct 2011 04:09:08 +0000 (00:09 -0400)
committerRich Felker <dalias@aerifal.cx>
Mon, 3 Oct 2011 04:09:08 +0000 (00:09 -0400)
commit7fe58d3511387ab6c57909f6e4baef58acd6bd56
treec41921898477f2269c44b68b1befce6e6660cc0b
parentb3b00d11e87926b553429d341b020a8a070e4ea1
use count=0 instead of 1 for recursive mutex with only one lock reference

this simplifies the code paths slightly, but perhaps what's nicer is
that it makes recursive mutexes fully reentrant, i.e. locking and
unlocking from a signal handler works even if the interrupted code was
in the middle of locking or unlocking.
src/thread/pthread_mutex_trylock.c
src/thread/pthread_mutex_unlock.c