summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2004-06-14 21:16:40 +0000
committerjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2004-06-14 21:16:40 +0000
commitd96c82b6be75f255dc4e6914c3a2e59fb35deb96 (patch)
tree7b2065b246cbfe867e12ca1f574deff140254956 /configure.in
parentf533d6648b4902e891d32fa56c628c6f4656559d (diff)
downloadlibapr-d96c82b6be75f255dc4e6914c3a2e59fb35deb96.tar.gz
* 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: http://svn.apache.org/repos/asf/apr/apr/trunk@65198 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in14
1 files changed, 4 insertions, 10 deletions
diff --git a/configure.in b/configure.in
index 01871721c..493669abf 100644
--- a/configure.in
+++ b/configure.in
@@ -1597,8 +1597,10 @@ APR_IFALLYES(header:pthread.h define:PTHREAD_PROCESS_SHARED dnl
# 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()]))
@@ -1606,14 +1608,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