[svn-commits] russell: branch 1.4 r126573 - /branches/1.4/include/asterisk/lock.h

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Jun 30 11:05:09 CDT 2008


Author: russell
Date: Mon Jun 30 11:05:08 2008
New Revision: 126573

URL: http://svn.digium.com/view/asterisk?view=rev&rev=126573
Log:
Fix a typo in the non-DEBUG_THREADS version of the recently added DEADLOCK_AVOIDANCE()
macro.  This caused the lock to not actually be released, and as a result, not
avoid deadlocks at all.  This resolves the issues reported in the last while about
Asterisk locking up all over the place (and most commonly, in chan_iax2).

(closes issue #12927)
(closes issue #12940)
(closes issue #12925)
(potentially closes others ...)

Modified:
    branches/1.4/include/asterisk/lock.h

Modified: branches/1.4/include/asterisk/lock.h
URL: http://svn.digium.com/view/asterisk/branches/1.4/include/asterisk/lock.h?view=diff&rev=126573&r1=126572&r2=126573
==============================================================================
--- branches/1.4/include/asterisk/lock.h (original)
+++ branches/1.4/include/asterisk/lock.h Mon Jun 30 11:05:08 2008
@@ -712,9 +712,9 @@
 #else /* !DEBUG_THREADS */
 
 #define	DEADLOCK_AVOIDANCE(lock) \
-	ast_mutex_lock(lock); \
+	ast_mutex_unlock(lock); \
 	usleep(1); \
-	ast_mutex_unlock(lock);
+	ast_mutex_lock(lock);
 
 
 typedef pthread_mutex_t ast_mutex_t;




More information about the svn-commits mailing list