[asterisk-commits] russell: branch russell/chan_console r95349 - /team/russell/chan_console/utils/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Dec 28 23:31:40 CST 2007


Author: russell
Date: Fri Dec 28 23:31:40 2007
New Revision: 95349

URL: http://svn.digium.com/view/asterisk?view=rev&rev=95349
Log:
make this build on my mac ...

Modified:
    team/russell/chan_console/utils/extconf.c

Modified: team/russell/chan_console/utils/extconf.c
URL: http://svn.digium.com/view/asterisk/team/russell/chan_console/utils/extconf.c?view=diff&rev=95349&r1=95348&r2=95349
==============================================================================
--- team/russell/chan_console/utils/extconf.c (original)
+++ team/russell/chan_console/utils/extconf.c Fri Dec 28 23:31:40 2007
@@ -1194,21 +1194,6 @@
 						const char *mutex_name, ast_mutex_t *t,
 						pthread_mutexattr_t *attr) 
 {
-#ifdef AST_MUTEX_INIT_W_CONSTRUCTORS
-	int canlog = strcmp(filename, "logger.c");
-
-	if ((t->mutex) != ((pthread_mutex_t) PTHREAD_MUTEX_INITIALIZER)) {
-		if ((t->mutex) != (empty_mutex)) {
-			__ast_mutex_logger("%s line %d (%s): Error: mutex '%s' is already initialized.\n",
-					   filename, lineno, func, mutex_name);
-			__ast_mutex_logger("%s line %d (%s): Error: previously initialization of mutex '%s'.\n",
-					   t->file[0], t->lineno[0], t->func[0], mutex_name);
-			DO_THREAD_CRASH;
-			return 0;
-		}
-	}
-#endif
-
 	t->file[0] = filename;
 	t->lineno[0] = lineno;
 	t->func[0] = func;
@@ -1235,13 +1220,6 @@
 {
 	int res;
 	int canlog = strcmp(filename, "logger.c");
-
-#ifdef AST_MUTEX_INIT_W_CONSTRUCTORS
-	if ((t->mutex) == ((pthread_mutex_t) PTHREAD_MUTEX_INITIALIZER)) {
-		__ast_mutex_logger("%s line %d (%s): Error: mutex '%s' is uninitialized.\n",
-				   filename, lineno, func, mutex_name);
-	}
-#endif
 
 	res = pthread_mutex_trylock(&t->mutex);
 	switch (res) {
@@ -1263,10 +1241,7 @@
 	if ((res = pthread_mutex_destroy(&t->mutex)))
 		__ast_mutex_logger("%s line %d (%s): Error destroying mutex: %s\n",
 				   filename, lineno, func, strerror(res));
-#ifndef PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP
-	else
-		t->mutex = PTHREAD_MUTEX_INIT_VALUE;
-#endif
+	
 	t->file[0] = filename;
 	t->lineno[0] = lineno;
 	t->func[0] = func;
@@ -1279,14 +1254,6 @@
 {
 	int res;
 	int canlog = strcmp(filename, "logger.c");
-
-#if defined(AST_MUTEX_INIT_W_CONSTRUCTORS)
-	if ((t->mutex) == ((pthread_mutex_t) PTHREAD_MUTEX_INITIALIZER)) {
-		__ast_mutex_logger("%s line %d (%s): Error: mutex '%s' is uninitialized.\n",
-				 filename, lineno, func, mutex_name);
-		ast_mutex_init(t);
-	}
-#endif /* AST_MUTEX_INIT_W_CONSTRUCTORS */
 
 #ifdef DETECT_DEADLOCKS
 	{
@@ -1349,14 +1316,6 @@
 	int res;
 	int canlog = strcmp(filename, "logger.c");
 
-#if defined(AST_MUTEX_INIT_W_CONSTRUCTORS)
-	if ((t->mutex) == ((pthread_mutex_t) PTHREAD_MUTEX_INITIALIZER)) {
-		__ast_mutex_logger("%s line %d (%s): Error: mutex '%s' is uninitialized.\n",
-				   filename, lineno, func, mutex_name);
-		ast_mutex_init(t);
-	}
-#endif /* AST_MUTEX_INIT_W_CONSTRUCTORS */
-
 	if (!(res = pthread_mutex_trylock(&t->mutex))) {
 		if (t->reentrancy < AST_MAX_REENTRANCY) {
 			t->file[t->reentrancy] = filename;
@@ -1382,13 +1341,6 @@
 	int res;
 	int canlog = strcmp(filename, "logger.c");
 
-#ifdef AST_MUTEX_INIT_W_CONSTRUCTORS
-	if ((t->mutex) == ((pthread_mutex_t) PTHREAD_MUTEX_INITIALIZER)) {
-		__ast_mutex_logger("%s line %d (%s): Error: mutex '%s' is uninitialized.\n",
-				   filename, lineno, func, mutex_name);
-	}
-#endif
-
 	if (t->reentrancy && (t->thread[t->reentrancy-1] != pthread_self())) {
 		__ast_mutex_logger("%s line %d (%s): attempted unlock mutex '%s' without owning it!\n",
 				   filename, lineno, func, mutex_name);
@@ -1449,13 +1401,6 @@
 {
 	int res;
 	int canlog = strcmp(filename, "logger.c");
-
-#ifdef AST_MUTEX_INIT_W_CONSTRUCTORS
-	if ((t->mutex) == ((pthread_mutex_t) PTHREAD_MUTEX_INITIALIZER)) {
-		__ast_mutex_logger("%s line %d (%s): Error: mutex '%s' is uninitialized.\n",
-				   filename, lineno, func, mutex_name);
-	}
-#endif
 
 	if (t->reentrancy && (t->thread[t->reentrancy-1] != pthread_self())) {
 		__ast_mutex_logger("%s line %d (%s): attempted unlock mutex '%s' without owning it!\n",
@@ -1504,13 +1449,6 @@
 {
 	int res;
 	int canlog = strcmp(filename, "logger.c");
-
-#ifdef AST_MUTEX_INIT_W_CONSTRUCTORS
-	if ((t->mutex) == ((pthread_mutex_t) PTHREAD_MUTEX_INITIALIZER)) {
-		__ast_mutex_logger("%s line %d (%s): Error: mutex '%s' is uninitialized.\n",
-				   filename, lineno, func, mutex_name);
-	}
-#endif
 
 	if (t->reentrancy && (t->thread[t->reentrancy-1] != pthread_self())) {
 		__ast_mutex_logger("%s line %d (%s): attempted unlock mutex '%s' without owning it!\n",




More information about the asterisk-commits mailing list