Subject: Re: pthread_mutex_unlock() question.
To: Martin Husemann <>
From: Andrew Gillham <>
List: netbsd-users
Date: 05/17/2003 00:47:55
On Sat, May 17, 2003 at 08:46:07AM +0200, Martin Husemann wrote:
> On Fri, May 16, 2003 at 11:30:27PM -0700, Andrew Gillham wrote:
> > What I would like to know, is what is the proper way to check whether
> > the mutex is already unlocked?
> AFAIKT there is none - the application has a severe design problem if it
> does not know wether it owns the mutex or not at any time.

Ok.  Yes, it seems like the one mutex sequence that is causing me trouble
is just broken. :)

I have reworked it slightly to resolve the multiple unlock issue.  Now I
just have to figure out some of the other reasons for crashes and lockups.

Potentially something is not getting locked at the right spot, etc.  I sure
do need something like "options LOCKDEBUG" for a pthreads app.