[asterisk-commits] russell: tag 1.4.21.1 r126578 - /tags/1.4.21.1/include/asterisk/lock.h

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jun 30 11:16:49 CDT 2008


Author: russell
Date: Mon Jun 30 11:16:49 2008
New Revision: 126578

URL: http://svn.digium.com/view/asterisk?view=rev&rev=126578
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:
    tags/1.4.21.1/include/asterisk/lock.h

Modified: tags/1.4.21.1/include/asterisk/lock.h
URL: http://svn.digium.com/view/asterisk/tags/1.4.21.1/include/asterisk/lock.h?view=diff&rev=126578&r1=126577&r2=126578
==============================================================================
--- tags/1.4.21.1/include/asterisk/lock.h (original)
+++ tags/1.4.21.1/include/asterisk/lock.h Mon Jun 30 11:16:49 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 asterisk-commits mailing list