You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by tr...@apache.org on 2009/11/21 15:40:21 UTC
svn commit: r882916 - in /apr/apr/branches/1.4.x: CHANGES
include/apr_global_mutex.h locks/unix/global_mutex.c
Author: trawick
Date: Sat Nov 21 14:40:20 2009
New Revision: 882916
URL: http://svn.apache.org/viewvc?rev=882916&view=rev
Log:
merge r882915 from trunk:
add missing apr_global_mutex_lockfile(), corresponding to
apr_proc_mutex_lockfile()
Modified:
apr/apr/branches/1.4.x/CHANGES
apr/apr/branches/1.4.x/include/apr_global_mutex.h
apr/apr/branches/1.4.x/locks/unix/global_mutex.c
Modified: apr/apr/branches/1.4.x/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/CHANGES?rev=882916&r1=882915&r2=882916&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/CHANGES [utf-8] (original)
+++ apr/apr/branches/1.4.x/CHANGES [utf-8] Sat Nov 21 14:40:20 2009
@@ -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]
Modified: apr/apr/branches/1.4.x/include/apr_global_mutex.h
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/include/apr_global_mutex.h?rev=882916&r1=882915&r2=882916&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/include/apr_global_mutex.h (original)
+++ apr/apr/branches/1.4.x/include/apr_global_mutex.h Sat Nov 21 14:40:20 2009
@@ -121,6 +121,12 @@
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 @@
#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
Modified: apr/apr/branches/1.4.x/locks/unix/global_mutex.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.4.x/locks/unix/global_mutex.c?rev=882916&r1=882915&r2=882916&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/locks/unix/global_mutex.c (original)
+++ apr/apr/branches/1.4.x/locks/unix/global_mutex.c Sat Nov 21 14:40:20 2009
@@ -175,4 +175,9 @@
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)