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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Dec 7 15:17:25 CST 2007


Author: russell
Date: Fri Dec  7 15:17:24 2007
New Revision: 91828

URL: http://svn.digium.com/view/asterisk?view=rev&rev=91828
Log:
Fix another bug in the DEBUG_THREADS code.  The ast_mutex_init() function had
the mutex attribute object marked as static.  This means that multiple threads
initializing locks at the same time could step on each other and end up with
improperly initialized locks.
(found when tracking down locking issues related to issue #11080)

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=91828&r1=91827&r2=91828
==============================================================================
--- branches/1.4/include/asterisk/lock.h (original)
+++ branches/1.4/include/asterisk/lock.h Fri Dec  7 15:17:24 2007
@@ -206,7 +206,7 @@
 						const char *mutex_name, ast_mutex_t *t) 
 {
 	int res;
-	static pthread_mutexattr_t  attr;
+	pthread_mutexattr_t  attr;
 
 #ifdef AST_MUTEX_INIT_W_CONSTRUCTORS
 




More information about the asterisk-commits mailing list