[svn-commits] mjordan: branch mjordan/1.8_instrumented r361948 - /team/mjordan/1.8_instrume...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Apr 11 15:03:51 CDT 2012


Author: mjordan
Date: Wed Apr 11 15:03:47 2012
New Revision: 361948

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=361948
Log:
Fix casting errors

Modified:
    team/mjordan/1.8_instrumented/main/asterisk.c

Modified: team/mjordan/1.8_instrumented/main/asterisk.c
URL: http://svnview.digium.com/svn/asterisk/team/mjordan/1.8_instrumented/main/asterisk.c?view=diff&rev=361948&r1=361947&r2=361948
==============================================================================
--- team/mjordan/1.8_instrumented/main/asterisk.c (original)
+++ team/mjordan/1.8_instrumented/main/asterisk.c Wed Apr 11 15:03:47 2012
@@ -400,18 +400,18 @@
 		return;
 	new->id = pthread_self();
 	new->name = name; /* steal the allocated memory for the thread name */
-	printf("Registering thread %s with ID %d [%d]\n", new->name, new->id, __LINE__);
+	printf("Registering thread %s with ID %p [%d]\n", new->name, (void*)new->id, __LINE__);
 	AST_RWLIST_WRLOCK(&thread_list);
 	AST_RWLIST_INSERT_HEAD(&thread_list, new, list);
 	AST_RWLIST_UNLOCK(&thread_list);
-	printf("Done registering thread %s with ID %d [%d]\n", new->name, new->id, __LINE__);
+	printf("Done registering thread %s with ID %p [%d]\n", new->name, (void*)new->id, __LINE__);
 }
 
 void ast_unregister_thread(void *id)
 {
 	struct thread_list_t *x;
 
-	printf("Attempting to gain thread list lock on thread ID %d [%d]\n", pthread_self(), __LINE__);
+	printf("Attempting to gain thread list lock on thread ID %p [%d]\n", (void*)id, __LINE__);
 	AST_RWLIST_WRLOCK(&thread_list);
 	AST_RWLIST_TRAVERSE_SAFE_BEGIN(&thread_list, x, list) {
 		if ((void *) x->id == id) {
@@ -421,7 +421,7 @@
 	}
 	AST_RWLIST_TRAVERSE_SAFE_END;
 	AST_RWLIST_UNLOCK(&thread_list);
-	printf("Released thread list lock on thread ID %d [%d]\n", pthread_self(), __LINE__);
+	printf("Released thread list lock on thread ID %p [%d]\n", (void*)pthread_self(), __LINE__);
 	if (x) {
 		ast_free(x->name);
 		ast_free(x);
@@ -526,14 +526,14 @@
 	case CLI_GENERATE:
 		return NULL;
 	}
-	printf("Attempting to gain thread list lock on thread ID %d [%d]\n", pthread_self(), __LINE__);
+	printf("Attempting to gain thread list lock on thread ID %p [%d]\n", (void*)pthread_self(), __LINE__);
 	AST_RWLIST_RDLOCK(&thread_list);
 	AST_RWLIST_TRAVERSE(&thread_list, cur, list) {
 		ast_cli(a->fd, "%p %s\n", (void *)cur->id, cur->name);
 		count++;
 	}
         AST_RWLIST_UNLOCK(&thread_list);
-    printf("Released thread list lock on thread ID %d [%d]\n", pthread_self(), __LINE__);
+    printf("Released thread list lock on thread ID %p [%d]\n", (void*)pthread_self(), __LINE__);
 	ast_cli(a->fd, "%d threads listed.\n", count);
 	return CLI_SUCCESS;
 }
@@ -1626,7 +1626,7 @@
 
 static void quit_handler(int num, shutdown_nice_t niceness, int restart)
 {
-	printf("Going into quit handler on thread ID %d\n", pthread_self());
+	printf("Going into quit handler on thread ID %p\n", (void*)pthread_self());
 	if (can_safely_quit(niceness, restart)) {
 		really_quit(num, niceness, restart);
 		/* No one gets here. */
@@ -1702,7 +1702,7 @@
 
 static void really_quit(int num, shutdown_nice_t niceness, int restart)
 {
-	printf("Starting really quit on thread ID %d\n", pthread_self());
+	printf("Starting really quit on thread ID %p\n", (void*)pthread_self());
 	if (niceness >= SHUTDOWN_NICE) {
 		ast_module_shutdown();
 	}
@@ -1759,7 +1759,7 @@
 		if (option_verbose || ast_opt_console)
 			ast_verbose("Asterisk is now restarting...\n");
 		restartnow = 1;
-		printf("Killing the logger on thread ID %d\n", pthread_self());
+		printf("Killing the logger on thread ID %p\n", (void*)pthread_self());
 		/* close logger */
 		close_logger();
 
@@ -1773,7 +1773,7 @@
 			execvp(_argv[0], _argv);
 	
 	} else {
-		printf("Killing the logger on thread ID %d\n", pthread_self());
+		printf("Killing the logger on thread ID %p\n", (void*)pthread_self());
 		/* close logger */
 		close_logger();
 	}




More information about the svn-commits mailing list