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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Dec 5 13:34:29 CST 2014


Author: rmudgett
Date: Fri Dec  5 13:34:23 2014
New Revision: 429026

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=429026
Log:
Fix some comments and move a couple canlog declarations.

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=429026&r1=429025&r2=429026
==============================================================================
--- team/rmudgett/debug_threads/main/lock.c (original)
+++ team/rmudgett/debug_threads/main/lock.c Fri Dec  5 13:34:23 2014
@@ -240,8 +240,8 @@
 #if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
 	if ((t->mutex) == ((pthread_mutex_t) PTHREAD_MUTEX_INITIALIZER)) {
 		/* Don't warn abount uninitialized mutex.
-		 * Simple try to initialize it.
-		 * May be not needed in linux system.
+		 * Simply try to initialize it.
+		 * May not be needed in linux system.
 		 */
 		res = __ast_pthread_mutex_init(t->tracking, filename, lineno, func, mutex_name, t);
 		if ((t->mutex) == ((pthread_mutex_t) PTHREAD_MUTEX_INITIALIZER)) {
@@ -377,8 +377,8 @@
 #if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
 	if ((t->mutex) == ((pthread_mutex_t) PTHREAD_MUTEX_INITIALIZER)) {
 		/* Don't warn abount uninitialized mutex.
-		 * Simple try to initialize it.
-		 * May be not needed in linux system.
+		 * Simply try to initialize it.
+		 * May not be needed in linux system.
 		 */
 		res = __ast_pthread_mutex_init(t->tracking, filename, lineno, func, mutex_name, t);
 		if ((t->mutex) == ((pthread_mutex_t) PTHREAD_MUTEX_INITIALIZER)) {
@@ -883,10 +883,10 @@
 
 #if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
 	if ((t->lock) == ((pthread_rwlock_t) __AST_RWLOCK_INIT_VALUE)) {
-		 /* Don't warn abount uninitialized lock.
-		  * Simple try to initialize it.
-		  * May be not needed in linux system.
-		  */
+		/* Don't warn abount uninitialized lock.
+		 * Simply try to initialize it.
+		 * May not be needed in linux system.
+		 */
 		res = __ast_rwlock_init(t->tracking, filename, line, func, name, t);
 		if ((t->lock) == ((pthread_rwlock_t) __AST_RWLOCK_INIT_VALUE)) {
 			__ast_mutex_logger("%s line %d (%s): Error: rwlock '%s' is uninitialized and unable to initialize.\n",
@@ -1007,10 +1007,10 @@
 
 #if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
 	if ((t->lock) == ((pthread_rwlock_t) __AST_RWLOCK_INIT_VALUE)) {
-		 /* Don't warn abount uninitialized lock.
-		  * Simple try to initialize it.
-		  * May be not needed in linux system.
-		  */
+		/* Don't warn abount uninitialized lock.
+		 * Simply try to initialize it.
+		 * May not be needed in linux system.
+		 */
 		res = __ast_rwlock_init(t->tracking, filename, line, func, name, t);
 		if ((t->lock) == ((pthread_rwlock_t) __AST_RWLOCK_INIT_VALUE)) {
 			__ast_mutex_logger("%s line %d (%s): Error: rwlock '%s' is uninitialized and unable to initialize.\n",
@@ -1131,10 +1131,10 @@
 
 #if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
 	if ((t->lock) == ((pthread_rwlock_t) __AST_RWLOCK_INIT_VALUE)) {
-		 /* Don't warn abount uninitialized lock.
-		  * Simple try to initialize it.
-		  * May be not needed in linux system.
-		  */
+		/* Don't warn abount uninitialized lock.
+		 * Simply try to initialize it.
+		 * May not be needed in linux system.
+		 */
 		res = __ast_rwlock_init(t->tracking, filename, line, func, name, t);
 		if ((t->lock) == ((pthread_rwlock_t) __AST_RWLOCK_INIT_VALUE)) {
 			__ast_mutex_logger("%s line %d (%s): Error: rwlock '%s' is uninitialized and unable to initialize.\n",
@@ -1239,10 +1239,10 @@
 
 #if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
 	if ((t->lock) == ((pthread_rwlock_t) __AST_RWLOCK_INIT_VALUE)) {
-		 /* Don't warn abount uninitialized lock.
-		  * Simple try to initialize it.
-		  * May be not needed in linux system.
-		  */
+		/* Don't warn abount uninitialized lock.
+		 * Simply try to initialize it.
+		 * May not be needed in linux system.
+		 */
 		res = __ast_rwlock_init(t->tracking, filename, line, func, name, t);
 		if ((t->lock) == ((pthread_rwlock_t) __AST_RWLOCK_INIT_VALUE)) {
 			__ast_mutex_logger("%s line %d (%s): Error: rwlock '%s' is uninitialized and unable to initialize.\n",
@@ -1342,14 +1342,15 @@
 #ifdef HAVE_BKTR
 	struct ast_bt *bt = NULL;
 #endif
-#if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
-	int canlog = t->tracking && strcmp(filename, "logger.c");
-
+
+#if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
 	if ((t->lock) == ((pthread_rwlock_t) __AST_RWLOCK_INIT_VALUE)) {
-		 /* Don't warn abount uninitialized lock.
-		  * Simple try to initialize it.
-		  * May be not needed in linux system.
-		  */
+		int canlog = t->tracking && strcmp(filename, "logger.c");
+
+		/* Don't warn abount uninitialized lock.
+		 * Simply try to initialize it.
+		 * May not be needed in linux system.
+		 */
 		res = __ast_rwlock_init(t->tracking, filename, line, func, name, t);
 		if ((t->lock) == ((pthread_rwlock_t) __AST_RWLOCK_INIT_VALUE)) {
 			__ast_mutex_logger("%s line %d (%s): Error: rwlock '%s' is uninitialized and unable to initialize.\n",
@@ -1417,14 +1418,15 @@
 #ifdef HAVE_BKTR
 	struct ast_bt *bt = NULL;
 #endif
-#if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
-	int canlog = t->tracking && strcmp(filename, "logger.c");
-
+
+#if defined(AST_MUTEX_INIT_W_CONSTRUCTORS) && defined(CAN_COMPARE_MUTEX_TO_INIT_VALUE)
 	if ((t->lock) == ((pthread_rwlock_t) __AST_RWLOCK_INIT_VALUE)) {
-		 /* Don't warn abount uninitialized lock.
-		  * Simple try to initialize it.
-		  * May be not needed in linux system.
-		  */
+		int canlog = t->tracking && strcmp(filename, "logger.c");
+
+		/* Don't warn abount uninitialized lock.
+		 * Simply try to initialize it.
+		 * May not be needed in linux system.
+		 */
 		res = __ast_rwlock_init(t->tracking, filename, line, func, name, t);
 		if ((t->lock) == ((pthread_rwlock_t) __AST_RWLOCK_INIT_VALUE)) {
 			__ast_mutex_logger("%s line %d (%s): Error: rwlock '%s' is uninitialized and unable to initialize.\n",




More information about the asterisk-commits mailing list