[asterisk-commits] file: trunk r48480 - /trunk/include/asterisk/lock.h

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Dec 14 23:34:30 MST 2006


Author: file
Date: Fri Dec 15 00:34:29 2006
New Revision: 48480

URL: http://svn.digium.com/view/asterisk?view=rev&rev=48480
Log:
Add support to see what holds the lock when doing trylock.

Modified:
    trunk/include/asterisk/lock.h

Modified: trunk/include/asterisk/lock.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/lock.h?view=diff&rev=48480&r1=48479&r2=48480
==============================================================================
--- trunk/include/asterisk/lock.h (original)
+++ trunk/include/asterisk/lock.h Fri Dec 15 00:34:29 2006
@@ -303,8 +303,11 @@
 			t->reentrancy++;
 		} else {
 			__ast_mutex_logger("%s line %d (%s): '%s' really deep reentrancy!\n",
-							   filename, lineno, func, mutex_name);
+					   filename, lineno, func, mutex_name);
 		}
+	} else {
+		__ast_mutex_logger("%s line %d (%s): Error: '%s' was locked here.\n",
+                                   t->file[t->reentrancy-1], t->lineno[t->reentrancy-1], t->func[t->reentrancy-1], mutex_name);
 	}
 
 	return res;



More information about the asterisk-commits mailing list