You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by tr...@apache.org on 2001/07/05 02:02:10 UTC
cvs commit: apr/build apr_common.m4
trawick 01/07/04 17:02:10
Modified: . configure.in
build apr_common.m4
Log:
Stop trying to provide cross-process pthread mutexes on systems where
the form of shared memory used with this code isn't available.
This gets APR_HAS_PROC_PTHREAD_SERIALIZE set to 0 on (at least) HP-UX
and OS/390.
Revision Changes Path
1.328 +7 -2 apr/configure.in
Index: configure.in
===================================================================
RCS file: /home/cvs/apr/configure.in,v
retrieving revision 1.327
retrieving revision 1.328
diff -u -r1.327 -r1.328
--- configure.in 2001/07/02 19:36:44 1.327
+++ configure.in 2001/07/05 00:02:09 1.328
@@ -912,6 +912,7 @@
echo $ac_n "${nl}Checking for Locking...${nl}"
AC_CHECK_FUNCS(semget semctl flock)
+APR_CHECK_FILE(/dev/zero)
# It's stupid, but not all platforms have union semun, even those that need it.
AC_MSG_CHECKING(for union semun in sys/sem.h)
@@ -973,7 +974,10 @@
APR_IFALLYES(func:semget func:semctl define:SEM_UNDO, hassysvser="1", hassysvser="0")
APR_IFALLYES(func:flock define:LOCK_EX, hasflockser="1", hasflockser="0")
APR_IFALLYES(header:fcntl.h define:F_SETLK, hasfcntlser="1", hasfcntlser="0")
-APR_IFALLYES(header:pthread.h define:PTHREAD_PROCESS_SHARED func:pthread_mutexattr_setpshared, hasprocpthreadser="1", hasprocpthreadser="0")
+# note: the current APR use of shared mutex requires /dev/zero
+APR_IFALLYES(header:pthread.h define:PTHREAD_PROCESS_SHARED dnl
+ func:pthread_mutexattr_setpshared file:/dev/zero,
+ hasprocpthreadser="1", hasprocpthreadser="0")
APR_IFALLYES(struct:pthread_rw, hasrwlockser="1", hasrwlockser="0")
# See which lock mechanism we'll select by default on this system.
@@ -983,8 +987,9 @@
APR_DECIDE(USE_SYSVSEM_SERIALIZE, [SysV IPC semget()]))
APR_IFALLYES(func:flock define:LOCK_EX,
APR_DECIDE(USE_FLOCK_SERIALIZE, [4.2BSD-style flock()]))
+# note: the current APR use of shared mutex requires /dev/zero
APR_IFALLYES(header:pthread.h define:PTHREAD_PROCESS_SHARED dnl
- func:pthread_mutexattr_setpshared,
+ func:pthread_mutexattr_setpshared file:/dev/zero,
APR_DECIDE(USE_PROC_PTHREAD_SERIALIZE, [pthread mutex]))
APR_IFALLYES(header:fcntl.h define:F_SETLK,
APR_DECIDE(USE_FCNTL_SERIALIZE, [SVR4-style fcntl()]))
1.20 +19 -0 apr/build/apr_common.m4
Index: apr_common.m4
===================================================================
RCS file: /home/cvs/apr/build/apr_common.m4,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- apr_common.m4 2001/07/01 05:49:44 1.19
+++ apr_common.m4 2001/07/05 00:02:10 1.20
@@ -224,6 +224,25 @@
], ac_cv_define_$1=yes, ac_cv_define_$1=no)
])
+define(APR_CHECK_FILE,[
+ac_safe=`echo "$1" | sed 'y%./+-%__p_%'`
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(ac_cv_file_$ac_safe, [
+ if test -r $1; then
+ eval "ac_cv_file_$ac_safe=yes"
+ else
+ eval "ac_cv_file_$ac_safe=no"
+ fi
+])dnl
+if eval "test \"`echo '$ac_cv_file_'$ac_safe`\" = yes"; then
+ AC_MSG_RESULT(yes)
+ ifelse([$2], , :, [$2])
+else
+ AC_MSG_RESULT(no)
+ifelse([$3], , , [$3])
+fi
+])
+
define(APR_IFALLYES,[dnl
ac_rc=yes
for ac_spec in $1; do
Re: cvs commit: apr/build apr_common.m4
Posted by Jeff Trawick <tr...@attglobal.net>.
Justin Erenkrantz <je...@ebuilt.com> writes:
> On Thu, Jul 05, 2001 at 12:02:10AM -0000, trawick@apache.org wrote:
> > trawick 01/07/04 17:02:10
> >
> > Modified: . configure.in
> > build apr_common.m4
> > Log:
> > Stop trying to provide cross-process pthread mutexes on systems where
> > the form of shared memory used with this code isn't available.
> >
> > This gets APR_HAS_PROC_PTHREAD_SERIALIZE set to 0 on (at least) HP-UX
> > and OS/390.
>
> I have a feeling if we get true shmem working in APR (as Ian just posted
> about), then this problem goes away, right? -- justin
>
one would certainly hope so :)
I'd hack something simple in the meantime using another mechanism
but...
. for OS/390, I hear that SysV sem is the way to go so no hurry there...
. I have no idea how important it is to have
APR_HAS_PROC_PTHREAD_SERIALIZE on HP-UX...
. I don't know of any other systems in this situation
--
Jeff Trawick | trawick@attglobal.net | PGP public key at web site:
http://www.geocities.com/SiliconValley/Park/9289/
Born in Roswell... married an alien...
Re: cvs commit: apr/build apr_common.m4
Posted by Justin Erenkrantz <je...@ebuilt.com>.
On Thu, Jul 05, 2001 at 12:02:10AM -0000, trawick@apache.org wrote:
> trawick 01/07/04 17:02:10
>
> Modified: . configure.in
> build apr_common.m4
> Log:
> Stop trying to provide cross-process pthread mutexes on systems where
> the form of shared memory used with this code isn't available.
>
> This gets APR_HAS_PROC_PTHREAD_SERIALIZE set to 0 on (at least) HP-UX
> and OS/390.
I have a feeling if we get true shmem working in APR (as Ian just posted
about), then this problem goes away, right? -- justin