apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <traw...@attglobal.net>
Subject Re: [PATCH] apr_lock.h update to remove/fix CROSS_PROCESS vs LOCKALL
Date Tue, 03 Jul 2001 18:46:39 GMT
Justin Erenkrantz <jerenkrantz@ebuilt.com> writes:

> [ Dropping new-httpd as this has no current relevance to them ]
> 
> On Tue, Jul 03, 2001 at 09:25:26AM -0700, Aaron Bannert wrote:
> > That would be useful if APR_HAS_THREADS was somehow set per the app's
> > definition, not at APR's buildtime. I assume you're talking about this:
> > 
> >     case APR_PROCESS_SHARED:
> >         if (new->inter_meth->flags & APR_PROCESS_LOCK_MECH_IS_GLOBAL)
{
> >             new->meth = new->inter_meth;  /* impl. uses one lock */
> >         }
> >         else {
> >             new->meth = &lockall_methods; /* impl. uses two locks */
> >         }
> >         break;
> 
> When I looked at it this morning, I thought it didn't do what we want.
> Now, that I went back to sleep and woke up again, it seems to do what we
> want.  That is defined when we are either on OS/390 or we don't have
> threads, which seems to be the correct definition.  And, I guess that
> when we use pthread_mutex_t (which we think is broken) for
> PROCESS_SHARED, it automatically gets the PROCESS_PRIVATE lock.

Note that APR currently doesn't have the right information now to set
APR_PROCESS_LOCK_MECH_IS_GLOBAL properly, so we end up getting two
locks instead of one on some platform/mechanisms where it isn't really
needed.

But assuming that we get more hints or whatever to turn on
APR_PROCESS_LOCK_MECH_IS_GLOBAL in more cases then magic should
happen.

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