apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject Re: nested mutexes
Date Tue, 19 Jun 2001 11:08:13 GMT
Justin Erenkrantz <jerenkrantz@ebuilt.com> writes:

> 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)

no, by "nested mutex" I mean that this is allowed

Thread A holds mutex 1
Thread A obtains mutex 1 again

what I call "nested mutex acquire" is sometimes called "recursive
mutex acquire"

-- 
Jeff Trawick | trawick@attglobal.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...


Mime
View raw message