httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <...@apache.org>
Subject Re: [PATCH] Use mutex locks in mod_specweb99.c
Date Fri, 13 Dec 2002 18:05:54 GMT


On Fri, 13 Dec 2002, Aaron Bannert wrote:

>
> On Friday, December 13, 2002, at 09:06  AM, <rbb@apache.org> wrote:
>
> > On Fri, 13 Dec 2002, Aaron Bannert wrote:
> >
> >>
> >> On Thursday, December 12, 2002, at 12:34  PM, Greg Ames wrote:
> >>> I dug into APR locks a little bit.  The apr_global_mutex_* functions
> >>> turn into two separate syscalls, with #if APR_HAS_THREADS around the
> >>> thread mutexing.  So unfortunately they wouldn't save us any syscalls
> >>> :-( :-(  But they might save a little bit of function call overhead.
> >>>
> >>> Another interesting place to look is in
> >>> srclib/apr/include/arch/unix/apr_private.h .
> >>> There are several xxxx_IS_GLOBAL symbols for various serialization
> >>> mechanisms. On my Linux box, all of them are #undef'ed and commented
> >>> out, including fcntl and flock which are the two choices for
> >>> apr_file_lock.  Madhu, could you take a look there and see what
> >>> you've
> >>> got?
> >>
> >> You really shouldn't use those xxxx_IS_GLOBAL symbols for anything
> >> outside of APR.
> >> They are there for platforms like s390 where some of the file-based
> >> locks do actually
> >> serialize multiple threads within multiple processes.
> >
> > Um, then why in the world are those symbols in a public header file?
> > They
> > are only ever used inside of APR, so they should exist in
> > apr_private.h,
> > not apr.h.
>
> They are in apr_private.h.

Yes, but they are also in apr.h.

pigmy:~/apr/include -  9:57AM% grep "_IS_GLOBAL" apr.h
#define APR_PROCESS_LOCK_IS_GLOBAL        0
#define APR_PROC_MUTEX_IS_GLOBAL      0
pigmy:~/apr/include -  9:57AM% cd arch/unix
pigmy:~/apr/include/arch/unix -  9:57AM% grep "_IS_GLOBAL" apr_private.h
/* #undef POSIXSEM_IS_GLOBAL */
/* #undef SYSVSEM_IS_GLOBAL */
/* #undef FCNTL_IS_GLOBAL */
/* #undef FLOCK_IS_GLOBAL */
pigmy:~/apr/include/arch/unix -  9:57AM%


So, why are they in apr.h at all?

Ryan


Mime
View raw message