From 4b0365c31858da04108dcc33ff514d898d20b9ad Mon Sep 17 00:00:00 2001 From: Yann Ylavic Date: Fri, 22 Mar 2019 01:27:18 +0000 Subject: Use proc mutex pthread by default when robust[_np] On platforms that support pshared and robust pthread mutex, this is usually the best interprocess mutex mechanism because it's efficient, posix, not limited and not persistent on the system when the program exits (i.e. no need to delete it explicitely before leaving, like IPC SysV or files for instance). Note that on older POSIX systems pthread_mutex_{setrobust,consistent}() funcs existed with the non-posix _np() suffix, and we consider them equivalent. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1856022 13f79535-47bb-0310-9956-ffa450edef68 --- configure.in | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 4a0ef8293..be06e39cb 100644 --- a/configure.in +++ b/configure.in @@ -2324,6 +2324,14 @@ APR_IFALLYES(func:semget func:semctl func:semop define:SEM_UNDO, APR_DECIDE(USE_SYSVSEM_SERIALIZE, [SysV IPC semget()])) APR_IFALLYES(header:OS.h func:create_sem func:acquire_sem func:acquire_sem_etc, APR_DECIDE(USE_BEOSSEM, [BeOS Semaphores])) +# pthread mutex both pshared and robust[_np] is the best default +case "$apr_cv_mutex_robust_shared" in +"yes"|"np") + APR_DECIDE(USE_PROC_PTHREAD_SERIALIZE, [pthread pshared mutex]) + ;; +*) + ;; +esac if test "x$apr_lock_method" != "x"; then APR_DECISION_FORCE($apr_lock_method) fi -- cgit v1.2.1