apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yla...@apache.org
Subject svn commit: r1790446 - /apr/apr/trunk/locks/unix/proc_mutex.c
Date Thu, 06 Apr 2017 19:57:33 GMT
Author: ylavic
Date: Thu Apr  6 19:57:33 2017
New Revision: 1790446

URL: http://svn.apache.org/viewvc?rev=1790446&view=rev
Log:
locks: follow up to r1790330.

Don't try to access proc_pthread_mutex_t's condvar if the mutex was _put[_ex]()
and not _create()d, this is a real pthread_mutex_t.


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

Modified: apr/apr/trunk/locks/unix/proc_mutex.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/locks/unix/proc_mutex.c?rev=1790446&r1=1790445&r2=1790446&view=diff
==============================================================================
--- apr/apr/trunk/locks/unix/proc_mutex.c (original)
+++ apr/apr/trunk/locks/unix/proc_mutex.c Thu Apr  6 19:57:33 2017
@@ -505,7 +505,7 @@ typedef struct {
     (proc_pthread_cast(m)->cond)
     apr_int32_t     cond_locked;
 #define proc_pthread_mutex_cond_locked(m) \
-    (proc_pthread_cast(m)->cond_locked)
+    ((m)->pthread_refcounting ? proc_pthread_cast(m)->cond_locked : -1)
     apr_uint32_t    cond_num_waiters;
 #define proc_pthread_mutex_cond_num_waiters(m) \
     (proc_pthread_cast(m)->cond_num_waiters)



Mime
View raw message