diff options
author | Ryan Bloom <rbb@apache.org> | 2002-05-02 00:52:01 +0000 |
---|---|---|
committer | Ryan Bloom <rbb@apache.org> | 2002-05-02 00:52:01 +0000 |
commit | d18df9e344cd79007e6508d099d7a9a17bcbd8db (patch) | |
tree | 2d3fcc46c4db4896dc7ed283c5111f7cef740e41 /include/apr_portable.h | |
parent | 89eb3269a2614bd9481aa49b133ace42d036fc3f (diff) | |
download | apr-d18df9e344cd79007e6508d099d7a9a17bcbd8db.tar.gz |
Add apr_os_get function for global_mutexes.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@63346 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/apr_portable.h')
-rw-r--r-- | include/apr_portable.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/apr_portable.h b/include/apr_portable.h index 35648dc06..9252f4d2b 100644 --- a/include/apr_portable.h +++ b/include/apr_portable.h @@ -74,6 +74,7 @@ #include "apr_file_io.h" #include "apr_network_io.h" #include "apr_errno.h" +#include "apr_global_mutex.h" #include "apr_proc_mutex.h" #include "apr_time.h" #include "apr_dso.h" @@ -217,6 +218,24 @@ struct apr_os_sock_info_t { typedef struct apr_os_sock_info_t apr_os_sock_info_t; +#if APR_PROCESS_LOCK_IS_GLOBAL +#define apr_os_global_mutex_t apr_os_proc_mutex_t +#define apr_os_global_mutex_get apr_os_proc_mutex_get +#else + struct apr_os_global_mutex_t { + apr_pool_t *pool; + apr_proc_mutex_t *proc_mutex; +#if APR_HAS_THREADS + apr_thread_mutex_t *thread_mutex; +#endif /* APR_HAS_THREADS */ + }; + typedef struct apr_os_global_mutex_t apr_os_global_mutex_t; + +APR_DECLARE(apr_status_t) apr_os_global_mutex_get(apr_os_global_mutex_t *ospmutex, + apr_global_mutex_t *pmutex); +#endif + + /** * convert the file from apr type to os specific type. * @param thefile The os specific file we are converting to |