summaryrefslogtreecommitdiff
path: root/locks
diff options
context:
space:
mode:
authortrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2002-05-09 18:56:43 +0000
committertrawick <trawick@13f79535-47bb-0310-9956-ffa450edef68>2002-05-09 18:56:43 +0000
commitcc470704f31a83ed42bb1b550fc8872a33c8180d (patch)
tree5f6a97db2fc0f8c73cab710b014b53224f76b049 /locks
parent8411aca0f9fe26bac16f13eb84f4ab6c2bbc2844 (diff)
downloadlibapr-cc470704f31a83ed42bb1b550fc8872a33c8180d.tar.gz
Fix a problem with global mutexes on OS/390 when something other
than the default mechanism (fcntl) was used. The mutexes didn't necessarily block out other threads in the same process. This commit also adds the infrastructure to allow any individual process mutex mechanism to be declared as global for a platform so that APR doesn't wastefully use an extra thread mutex for any operations on a global mutex based on that process mutex mechanism. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63376 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'locks')
-rw-r--r--locks/unix/proc_mutex.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/locks/unix/proc_mutex.c b/locks/unix/proc_mutex.c
index 5808e7e39..3fa707cdf 100644
--- a/locks/unix/proc_mutex.c
+++ b/locks/unix/proc_mutex.c
@@ -167,7 +167,7 @@ static apr_status_t proc_mutex_posix_child_init(apr_proc_mutex_t **mutex,
const apr_proc_mutex_unix_lock_methods_t apr_proc_mutex_unix_posix_methods =
{
-#if APR_PROCESS_LOCK_IS_GLOBAL || !APR_HAS_THREADS
+#if APR_PROCESS_LOCK_IS_GLOBAL || !APR_HAS_THREADS || defined(POSIXSEM_IS_GLOBAL)
APR_PROCESS_LOCK_MECH_IS_GLOBAL,
#else
0,
@@ -282,7 +282,7 @@ static apr_status_t proc_mutex_sysv_child_init(apr_proc_mutex_t **mutex, apr_poo
const apr_proc_mutex_unix_lock_methods_t apr_proc_mutex_unix_sysv_methods =
{
-#if APR_PROCESS_LOCK_IS_GLOBAL || !APR_HAS_THREADS
+#if APR_PROCESS_LOCK_IS_GLOBAL || !APR_HAS_THREADS || defined(SYSVSEM_IS_GLOBAL)
APR_PROCESS_LOCK_MECH_IS_GLOBAL,
#else
0,
@@ -591,7 +591,7 @@ static apr_status_t proc_mutex_fcntl_child_init(apr_proc_mutex_t **mutex,
const apr_proc_mutex_unix_lock_methods_t apr_proc_mutex_unix_fcntl_methods =
{
-#if APR_PROCESS_LOCK_IS_GLOBAL || !APR_HAS_THREADS
+#if APR_PROCESS_LOCK_IS_GLOBAL || !APR_HAS_THREADS || defined(FCNTL_IS_GLOBAL)
APR_PROCESS_LOCK_MECH_IS_GLOBAL,
#else
0,
@@ -720,7 +720,7 @@ static apr_status_t proc_mutex_flock_child_init(apr_proc_mutex_t **mutex,
const apr_proc_mutex_unix_lock_methods_t apr_proc_mutex_unix_flock_methods =
{
-#if APR_PROCESS_LOCK_IS_GLOBAL || !APR_HAS_THREADS
+#if APR_PROCESS_LOCK_IS_GLOBAL || !APR_HAS_THREADS || defined(FLOCK_IS_GLOBAL)
APR_PROCESS_LOCK_MECH_IS_GLOBAL,
#else
0,