apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yla...@apache.org
Subject svn commit: r1738926 - in /apr/apr/trunk: CHANGES locks/unix/proc_mutex.c
Date Wed, 13 Apr 2016 11:58:06 GMT
Author: ylavic
Date: Wed Apr 13 11:58:06 2016
New Revision: 1738926

URL: http://svn.apache.org/viewvc?rev=1738926&view=rev
Log:
apr_os_proc_mutex-unix: For consistency with other OS native to APR
types constructors/_put()ers and non-unix mutex mechanisms, always
destroy the underlying native mutex when apr_proc_mutex_destroy() is
called explicitly.

Modified:
    apr/apr/trunk/CHANGES
    apr/apr/trunk/locks/unix/proc_mutex.c

Modified: apr/apr/trunk/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr/trunk/CHANGES?rev=1738926&r1=1738925&r2=1738926&view=diff
==============================================================================
--- apr/apr/trunk/CHANGES [utf-8] (original)
+++ apr/apr/trunk/CHANGES [utf-8] Wed Apr 13 11:58:06 2016
@@ -1,6 +1,11 @@
                                                      -*- coding: utf-8 -*-
 Changes for APR 2.0.0
 
+  *) apr_os_proc_mutex-unix: For consistency with other OS native to APR
+     types constructors/_put()ers and non-unix mutex mechanisms, always
+     destroy the underlying native mutex when apr_proc_mutex_destroy() is
+     called explicitly.  [Yann Ylavic]
+
   *) apr_os_proc_mutex_put_ex: Allow to specify whether the OS native
      mutex should or not be cleaned up (destroyed) with the constructed
      APR mutex (given pool), and default to not for the simple _put()

Modified: apr/apr/trunk/locks/unix/proc_mutex.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/locks/unix/proc_mutex.c?rev=1738926&r1=1738925&r2=1738926&view=diff
==============================================================================
--- apr/apr/trunk/locks/unix/proc_mutex.c (original)
+++ apr/apr/trunk/locks/unix/proc_mutex.c Wed Apr 13 11:58:06 2016
@@ -23,7 +23,11 @@
 
 APR_DECLARE(apr_status_t) apr_proc_mutex_destroy(apr_proc_mutex_t *mutex)
 {
-    return apr_pool_cleanup_run(mutex->pool, mutex, apr_proc_mutex_cleanup);
+    apr_status_t rv = apr_proc_mutex_cleanup(mutex);
+    if (rv == APR_SUCCESS) {
+        apr_pool_cleanup_kill(mutex->pool, mutex, apr_proc_mutex_cleanup);
+    }
+    return rv;
 }
 
 #if APR_HAS_POSIXSEM_SERIALIZE || APR_HAS_FCNTL_SERIALIZE || \



Mime
View raw message