apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jerenkra...@ebuilt.com>
Subject Re: nested mutexes
Date Fri, 15 Jun 2001 14:31:07 GMT
On Fri, Jun 15, 2001 at 05:59:14AM -0400, Jeff Trawick wrote:
> Jeff Trawick <trawick@attglobal.net> writes:
> 
> > 1. It looks to me that on Unix APR mutexes are always nesting if
> >    APR_HAS_THREADS and APR mutexes are never nesting (subject to their
> >    underlying implementation of course).  This is not cool.
> 
> I meant to say "It looks to me that on Unix APR mutexes are always nesting if
> APR_HAS_THREADS and APR mutexes are never nesting (subject to their
> underlying implementation of course) if !APR_HAS_THREADS."

Can you clarify what you mean by nesting?

Do you mean:

Thread A holds one mutex (say in apr_sendfile)
Thread A also obtains another mutex later on (say in apr_pool)

So, a thread may possibly obtain more than one mutex?  But, the mutex
handles will be different, right?  So, it shouldn't deadlock on itself.

I do think how APR (and httpd) uses locks in general needs a serious 
revisit.

Now, that the school year is done (yay!), I'll probably have time to 
look at this soon.  -- justin


Mime
View raw message