[asterisk-commits] branch 1.2 - commit revision 7213

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Mon Nov 28 19:25:28 CST 2005


Author: kpfleming
Date: Mon Nov 28 19:25:28 2005
New Revision: 7213

URL: http://svn.digium.com/view/asterisk?rev=7213&view=rev
Log:
if the lock protected a pthread_cond is held recursively, warn before waiting onthe condition

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

Modified: branches/1.2/include/asterisk/lock.h
URL: http://svn.digium.com/view/asterisk/branches/1.2/include/asterisk/lock.h?rev=7213&r1=7212&r2=7213&view=diff
==============================================================================
--- branches/1.2/include/asterisk/lock.h (original)
+++ branches/1.2/include/asterisk/lock.h Mon Nov 28 19:25:28 2005
@@ -396,6 +396,10 @@
 #endif
 	}
 
+	if (t->reentrancy)
+		__ast_mutex_logger("%s line %d (%s): mutex '%s' locked more than once, cond_wait will block!\n",
+				   filename, lineno, func, mutex_name);
+
 	if (--t->reentrancy < 0) {
 		__ast_mutex_logger("%s line %d (%s): mutex '%s' freed more times than we've locked!\n",
 				   filename, lineno, func, mutex_name);
@@ -454,6 +458,10 @@
 		DO_THREAD_CRASH;
 #endif
 	}
+
+	if (t->reentrancy)
+		__ast_mutex_logger("%s line %d (%s): mutex '%s' locked more than once, cond_timedwait will block!\n",
+				   filename, lineno, func, mutex_name);
 
 	if (--t->reentrancy < 0) {
 		__ast_mutex_logger("%s line %d (%s): mutex '%s' freed more times than we've locked!\n",



More information about the asterisk-commits mailing list