[asterisk-commits] rmudgett: branch 1.8 r367980 - in /branches/1.8/channels: sig_pri.c sig_ss7.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed May 30 13:05:52 CDT 2012


Author: rmudgett
Date: Wed May 30 13:05:48 2012
New Revision: 367980

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=367980
Log:
Use the DEADLOCK_AVOIDANCE() macro instead.

(issue ASTERISK-19854)

Modified:
    branches/1.8/channels/sig_pri.c
    branches/1.8/channels/sig_ss7.c

Modified: branches/1.8/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/sig_pri.c?view=diff&rev=367980&r1=367979&r2=367980
==============================================================================
--- branches/1.8/channels/sig_pri.c (original)
+++ branches/1.8/channels/sig_pri.c Wed May 30 13:05:48 2012
@@ -1190,9 +1190,7 @@
 
 		/* Avoid deadlock */
 		sig_pri_unlock_private(pri->pvts[chanpos]);
-		ast_mutex_unlock(&pri->lock);
-		sched_yield();
-		ast_mutex_lock(&pri->lock);
+		DEADLOCK_AVOIDANCE(&pri->lock);
 		sig_pri_lock_private(pri->pvts[chanpos]);
 	}
 }

Modified: branches/1.8/channels/sig_ss7.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8/channels/sig_ss7.c?view=diff&rev=367980&r1=367979&r2=367980
==============================================================================
--- branches/1.8/channels/sig_ss7.c (original)
+++ branches/1.8/channels/sig_ss7.c Wed May 30 13:05:48 2012
@@ -300,9 +300,7 @@
 
 		/* Avoid deadlock */
 		sig_ss7_unlock_private(ss7->pvts[chanpos]);
-		ast_mutex_unlock(&ss7->lock);
-		sched_yield();
-		ast_mutex_lock(&ss7->lock);
+		DEADLOCK_AVOIDANCE(&ss7->lock);
 		sig_ss7_lock_private(ss7->pvts[chanpos]);
 	}
 }




More information about the asterisk-commits mailing list