apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <trawi...@bellsouth.net>
Subject Re: controlling the flavor of lock used by APR
Date Thu, 30 Nov 2000 17:37:11 GMT
rbb@covalent.net writes:

> On Thu, 30 Nov 2000, Jeff Trawick wrote:
> > Does anyone have thoughts on what should be done in hints.m4 to set
> > the flavor of lock for a certain platform?
> Why do you want to do this?

For the same reason we had USE_xyz_SERIALIZED_ACCEPT in 1.3: because
certain locking mechanisms have better performance characteristics on
certain platforms and we can't autodetect that.  We can autodetect
what is available, but not what is most appropriate.

Sometimes it is not just a performance issue: we have heard tales of
certain locking mechanisms being flaky on certain platforms under certain

> > I don't yet completely understand the current logic for deciding, but
> > part of it doesn't look right:
> > 
> > AC_IFALLYES(custom:union_semun,
> >             AC_DECIDE(USE_SYSVSEM_SERIALIZE, [SysV IPC semget()]))
> > 
> > AFAIK, this says that if have_union_semun is set, we'll use SysV
> > semaphores.  But have_union_semun is rarely set since it is up to the
> > program to define union semun.
> Look ab out 20 lines above the AC_IFALLYES.  Some platforms do actually
> define union semun, but not all do.  We just find the platforms that
> advertise a semun, because we can't do much more than that.

My point is that the presence of union semun is not a valid indicator
of whether or not there are SysV sems.  We could check for semop() or
semctl() if this becomes important.

Jeff Trawick | trawick@ibm.net | PGP public key at web site:
          Born in Roswell... married an alien...

View raw message