apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <trawi...@bellsouth.net>
Subject Re: cvs commit: apr/locks/unix locks.c
Date Fri, 01 Dec 2000 15:04:32 GMT
rbb@covalent.net writes:

> >   Modified:    .        configure.in hints.m4 CHANGES
> >                include  apr.h.in apr.hw
> >                locks/unix locks.c
> >   Log:
> >   New config variable apr_process_lock_is_global specifies that the selected
> >   inter-process lock method is sufficient for APR_LOCKALL (i.e., it blocks
> >   all threads and processes).  For now, hints.m4 turns on this flag for
> >   OS/390.
> 
> MHO this was put in the wrong place.  This is an internal APR flag, and
> should not be in apr.h at all.  Really what this is, is an optimization,
> so that we don't create an intraprocess lock if the cross-process lock
> will lock the threads.  Locks and how they are setup was an area of great
> contention between Manoj and myself when I was designing them, because of
> lockall and cross-process locks.

I agree 99%.  App code shouldn't give a !@#$.  The remaining 1% is
that it can be extremely useful for apps to tell their users how they
were built.

Forget APR_PROCESS_LOCK_IS_GLOBAL for a sec and consider
APR_USE_xyz_SERIALIZE.  Apache code doesn't give a rip about it except
for generating the "htpd -V" output.  That has been quite useful
because of the large number of times the lock mechanism in use comes
up in discussions of performance and to a lesser extent brokenness.  I
consider APR_PROCESS_LOCK_IS_GLOBAL to be important too.

Back to reality though:

Why don't we add something like apr_get_config_string() which returns
a string like the "httpd -V" output (but of course only builds the APR
part)?

include/apr_general.h:

  apr_status_t apr_get_config_string(char **cfg, apr_pool_t *cont);

misc/unix/cfg.c:

  put the function here; any other functions dealing with config tests
  could go here too

With this in hand, we can decide that certain feature tests macros
aren't needed by apps and move them out of apr.h.

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

Mime
View raw message