From 59f9e4498e3c28943953e27a014f1f9a50b48ec7 Mon Sep 17 00:00:00 2001 From: rbb Date: Thu, 2 May 2002 00:52:01 +0000 Subject: Add apr_os_get function for global_mutexes. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@63346 13f79535-47bb-0310-9956-ffa450edef68 --- locks/unix/global_mutex.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'locks') diff --git a/locks/unix/global_mutex.c b/locks/unix/global_mutex.c index 15fab9481..763d0b0b5 100644 --- a/locks/unix/global_mutex.c +++ b/locks/unix/global_mutex.c @@ -57,6 +57,7 @@ #include "global_mutex.h" #include "apr_proc_mutex.h" #include "apr_thread_mutex.h" +#include "apr_portable.h" static apr_status_t global_mutex_cleanup(void *data) { @@ -178,6 +179,17 @@ APR_DECLARE(apr_status_t) apr_global_mutex_unlock(apr_global_mutex_t *mutex) return APR_SUCCESS; } +APR_DECLARE(apr_status_t) apr_os_global_mutex_get(apr_os_global_mutex_t *ospmutex, + apr_global_mutex_t *pmutex) +{ + ospmutex->pool = pmutex->pool; + ospmutex->proc_mutex = pmutex->proc_mutex; +#if APR_HAS_THREADS + ospmutex->thread_mutex = pmutex->thread_mutex; +#endif + return APR_SUCCESS; +} + APR_DECLARE(apr_status_t) apr_global_mutex_destroy(apr_global_mutex_t *mutex) { return apr_pool_cleanup_run(mutex->pool, mutex, global_mutex_cleanup); -- cgit v1.2.1