diff options
author | trawick <trawick@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-21 14:40:20 +0000 |
---|---|---|
committer | trawick <trawick@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-21 14:40:20 +0000 |
commit | f1d5da136721c6eead2e3d083475de7d27ab4c69 (patch) | |
tree | 89b421df94472648d2e2210b3d13b37e546ff73c | |
parent | 5dccc7d0ca5ab08cf5db4c0b4eec8ced9e9fdf60 (diff) | |
download | libapr-f1d5da136721c6eead2e3d083475de7d27ab4c69.tar.gz |
merge r882915 from trunk:
add missing apr_global_mutex_lockfile(), corresponding to
apr_proc_mutex_lockfile()
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.4.x@882916 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | CHANGES | 3 | ||||
-rw-r--r-- | include/apr_global_mutex.h | 7 | ||||
-rw-r--r-- | locks/unix/global_mutex.c | 5 |
3 files changed, 15 insertions, 0 deletions
@@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes for APR 1.4.0 + *) Add apr_global_mutex_lockfile() for finding the file, if any, + associated with the mutex. [Jeff Trawick] + *) Add apr_socket_atreadeof to determine whether the receive part of the socket has been closed by the peer. [Ruediger Pluem, Mladen Turk, Joe Orton] diff --git a/include/apr_global_mutex.h b/include/apr_global_mutex.h index 9316001ce..142e887a0 100644 --- a/include/apr_global_mutex.h +++ b/include/apr_global_mutex.h @@ -121,6 +121,12 @@ APR_DECLARE(apr_status_t) apr_global_mutex_unlock(apr_global_mutex_t *mutex); APR_DECLARE(apr_status_t) apr_global_mutex_destroy(apr_global_mutex_t *mutex); /** + * Return the name of the lockfile for the mutex, or NULL + * if the mutex doesn't use a lock file + */ +APR_DECLARE(const char *) apr_global_mutex_lockfile(apr_global_mutex_t *mutex); + +/** * Get the pool used by this global_mutex. * @return apr_pool_t the pool */ @@ -140,6 +146,7 @@ APR_POOL_DECLARE_ACCESSOR(global_mutex); #define apr_global_mutex_trylock apr_proc_mutex_trylock #define apr_global_mutex_unlock apr_proc_mutex_unlock #define apr_global_mutex_destroy apr_proc_mutex_destroy +#define apr_global_mutex_lockfile apr_proc_mutex_lockfile #define apr_global_mutex_pool_get apr_proc_mutex_pool_get #endif diff --git a/locks/unix/global_mutex.c b/locks/unix/global_mutex.c index bfe360aa9..63765c9f4 100644 --- a/locks/unix/global_mutex.c +++ b/locks/unix/global_mutex.c @@ -175,4 +175,9 @@ 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); } +APR_DECLARE(const char *) apr_global_mutex_lockfile(apr_global_mutex_t *mutex) +{ + return apr_proc_mutex_lockfile(mutex->proc_mutex); +} + APR_POOL_IMPLEMENT_ACCESSOR(global_mutex) |