[asterisk-commits] rmudgett: branch rmudgett/debug_threads r429174 - /team/rmudgett/debug_thread...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Dec 9 11:17:09 CST 2014


Author: rmudgett
Date: Tue Dec  9 11:17:02 2014
New Revision: 429174

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=429174
Log:
Address review feedback.

Modified:
    team/rmudgett/debug_threads/main/lock.c

Modified: team/rmudgett/debug_threads/main/lock.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/debug_threads/main/lock.c?view=diff&rev=429174&r1=429173&r2=429174
==============================================================================
--- team/rmudgett/debug_threads/main/lock.c (original)
+++ team/rmudgett/debug_threads/main/lock.c Tue Dec  9 11:17:02 2014
@@ -131,14 +131,12 @@
 #ifdef DEBUG_THREADS
 #if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
 	if ((t->mutex) != ((pthread_mutex_t) PTHREAD_MUTEX_INITIALIZER)) {
-/*
 		int canlog = tracking && strcmp(filename, "logger.c");
 
 		__ast_mutex_logger("%s line %d (%s): NOTICE: mutex '%s' is already initialized.\n",
 				   filename, lineno, func, mutex_name);
 		DO_THREAD_CRASH;
-*/
-		return 0;
+		return EBUSY;
 	}
 #endif /* AST_MUTEX_INIT_W_CONSTRUCTORS */
 
@@ -173,6 +171,7 @@
 		 */
 		__ast_mutex_logger("%s line %d (%s): NOTICE: mutex '%s' is uninitialized.\n",
 				   filename, lineno, func, mutex_name);
+		DO_THREAD_CRASH;
 		res = EINVAL;
 		goto lt_cleanup;
 	}
@@ -692,6 +691,7 @@
 
 		__ast_mutex_logger("%s line %d (%s): Warning: rwlock '%s' is already initialized.\n",
 				filename, lineno, func, rwlock_name);
+		DO_THREAD_CRASH;
 		return EBUSY;
 	}
 #endif /* AST_MUTEX_INIT_W_CONSTRUCTORS */
@@ -722,6 +722,7 @@
 	if (t->lock == ((pthread_rwlock_t) __AST_RWLOCK_INIT_VALUE)) {
 		__ast_mutex_logger("%s line %d (%s): Warning: rwlock '%s' is uninitialized.\n",
 				   filename, lineno, func, rwlock_name);
+		DO_THREAD_CRASH;
 		res = EINVAL;
 		goto lt_cleanup;
 	}




More information about the asterisk-commits mailing list