diff options
author | Yann Ylavic <ylavic@apache.org> | 2019-03-22 01:27:18 +0000 |
---|---|---|
committer | Yann Ylavic <ylavic@apache.org> | 2019-03-22 01:27:18 +0000 |
commit | 4b0365c31858da04108dcc33ff514d898d20b9ad (patch) | |
tree | 5c1f096f453ec077fb86a2325439fefdb821c5c1 /configure.in | |
parent | a05bc5213c1ac82e85c0167d158548436bd5a6c9 (diff) | |
download | apr-4b0365c31858da04108dcc33ff514d898d20b9ad.tar.gz |
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
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 8 |
1 files changed, 8 insertions, 0 deletions
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 |