apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r884141 - in /apr/apr/branches/1.4.x: CHANGES include/apr_global_mutex.h locks/unix/global_mutex.c
Date Wed, 25 Nov 2009 15:26:26 GMT
Author: trawick
Date: Wed Nov 25 15:26:25 2009
New Revision: 884141

URL: http://svn.apache.org/viewvc?rev=884141&view=rev
Log:
merge r884139 from trunk:

add apr_global_mutex_name(), for retrieving the name of the mechanism
used by the underlying apr_proc_mutex_t

declare NULL as the result for any future mechanisms that don't have
an underlying apr_proc_mutex_t or equivalent

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=884141&r1=884140&r2=884141&view=diff
==============================================================================
--- apr/apr/branches/1.4.x/CHANGES [utf-8] (original)
+++ apr/apr/branches/1.4.x/CHANGES [utf-8] Wed Nov 25 15:26:25 2009
@@ -1,8 +1,10 @@
                                                      -*- 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_global_mutex_lockfile() for retrieving the file, if any,
+     associated with the mutex.  Add apr_global_mutex_name() for retrieving
+     the name of the lock mechanism used by the underlying proc mutex.
+     [Jeff Trawick]
 
   *) Add apr_socket_atreadeof to determine whether the receive part of the
      socket has been closed by the peer.

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=884141&r1=884140&r2=884141&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 Wed Nov 25 15:26:25 2009
@@ -127,6 +127,14 @@
 APR_DECLARE(const char *) apr_global_mutex_lockfile(apr_global_mutex_t *mutex);
 
 /**
+ * Display the name of the mutex, as it relates to the actual method used
+ * for the underlying apr_proc_mutex_t, if any.  NULL is returned if
+ * there is no underlying apr_proc_mutex_t.
+ * @param mutex the name of the mutex
+ */
+APR_DECLARE(const char *) apr_global_mutex_name(apr_global_mutex_t *mutex);
+
+/**
  * Get the pool used by this global_mutex.
  * @return apr_pool_t the pool
  */
@@ -147,6 +155,7 @@
 #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_name       apr_proc_mutex_name
 #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=884141&r1=884140&r2=884141&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 Wed Nov 25 15:26:25 2009
@@ -180,4 +180,9 @@
     return apr_proc_mutex_lockfile(mutex->proc_mutex);
 }
 
+APR_DECLARE(const char *) apr_global_mutex_name(apr_global_mutex_t *mutex)
+{
+    return apr_proc_mutex_name(mutex->proc_mutex);
+}
+
 APR_POOL_IMPLEMENT_ACCESSOR(global_mutex)



Mime
View raw message