diff options
author | Joe Orton <jorton@apache.org> | 2004-06-22 08:45:04 +0000 |
---|---|---|
committer | Joe Orton <jorton@apache.org> | 2004-06-22 08:45:04 +0000 |
commit | 508dffb8cb2c8107e79cd858c2c41a1115acf78f (patch) | |
tree | 4cb19123e86cdb91c870a7405f32de1f6f00d32b | |
parent | 6d0cfbffbeb1f97de5761fea0168ed706c21d93d (diff) | |
download | apr-508dffb8cb2c8107e79cd858c2c41a1115acf78f.tar.gz |
Backport from HEAD:
* configure.in: Don't use POSIX semaphores or cross-process pthread
mutexes as the default inter-process locking mechanism.
* build/apr_hints.m4: Force default inter-process locking mechanism to
fcntl for Solaris, as per 1.3.
Reviewed by: Jeff Trawick
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/APR_0_9_BRANCH@65211 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | CHANGES | 4 | ||||
-rw-r--r-- | build/apr_hints.m4 | 1 | ||||
-rw-r--r-- | configure.in | 14 |
3 files changed, 9 insertions, 10 deletions
@@ -1,5 +1,9 @@ Changes with APR 0.9.5 + *) Change default inter-process locking mechanisms: POSIX semaphores + and pthread cross-process mutexes are not used by default; on + Solaris, fcntl locks are used by default. [Joe Orton] + *) Don't try to enable run-time linking on AIX < 4.2, as this results in invalid linker options being used. PR 29170. [Jeff Trawick] diff --git a/build/apr_hints.m4 b/build/apr_hints.m4 index 224360812..92eed44a5 100644 --- a/build/apr_hints.m4 +++ b/build/apr_hints.m4 @@ -198,6 +198,7 @@ dnl # Not a problem in 10.20. Otherwise, who knows? *-solaris2*) PLATOSVERS=`echo $host | sed 's/^.*solaris2.//'` APR_ADDTO(CPPFLAGS, [-DSOLARIS2=$PLATOSVERS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT]) + APR_SETIFNULL(apr_lock_method, [USE_FCNTL_SERIALIZE]) ;; *-sunos4*) APR_ADDTO(CPPFLAGS, [-DSUNOS4]) diff --git a/configure.in b/configure.in index 75bb3fa3e..0436f99bf 100644 --- a/configure.in +++ b/configure.in @@ -1544,8 +1544,10 @@ APR_IFALLYES(struct:pthread_rw, hasrwlockser="1", hasrwlockser="0") # See which lock mechanism we'll select by default on this system. # The last APR_DECIDE to execute sets the default. # At this stage, we match the ordering in Apache 1.3 -# which is (highest to lowest): pthread -> posixsem -> sysvsem -> fcntl -> flock -# +# which is (highest to lowest): sysvsem -> fcntl -> flock. +# POSIX semaphores and cross-process pthread mutexes are not +# used by default since they have less desirable behaviour when +# e.g. a process holding the mutex segfaults. APR_BEGIN_DECISION([apr_lock implementation method]) APR_IFALLYES(func:flock define:LOCK_EX, APR_DECIDE(USE_FLOCK_SERIALIZE, [4.2BSD-style flock()])) @@ -1553,14 +1555,6 @@ APR_IFALLYES(header:fcntl.h define:F_SETLK, APR_DECIDE(USE_FCNTL_SERIALIZE, [SVR4-style fcntl()])) APR_IFALLYES(func:semget func:semctl define:SEM_UNDO, APR_DECIDE(USE_SYSVSEM_SERIALIZE, [SysV IPC semget()])) -APR_IFALLYES(header:semaphore.h func:sem_open func_sem_close dnl - func_sem_unlink func:sem_post func_sem_wait, - APR_DECIDE(USE_POSIXSEM_SERIALIZE, [POSIX sem_open()])) -# 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 dnl - file:/dev/zero, - APR_DECIDE(USE_PROC_PTHREAD_SERIALIZE, [pthread mutex])) if test "x$apr_lock_method" != "x"; then APR_DECISION_FORCE($apr_lock_method) fi |