From 7ac0138d319427ea674806c97d9879bdfee711a9 Mon Sep 17 00:00:00 2001 From: Alec L Davis Date: Tue, 15 Mar 2011 01:00:55 +0000 Subject: [PATCH] core show locks: display ThreadID in hexadecimal Allow easier cross referencing of thread ID's with GDB backtraces (closes issue #18968) Reported by: alecdavis Patches: bug18968.diff.txt uploaded by alecdavis (license 585) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@310781 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/utils.c b/main/utils.c index 690b50e098..25e6a7ec1b 100644 --- a/main/utils.c +++ b/main/utils.c @@ -878,7 +878,7 @@ static char *handle_show_locks(struct ast_cli_entry *e, int cmd, struct ast_cli_ AST_LIST_TRAVERSE(&lock_infos, lock_info, entry) { int i; if (lock_info->num_locks) { - ast_str_append(&str, 0, "=== Thread ID: %ld (%s)\n", (long) lock_info->thread_id, + ast_str_append(&str, 0, "=== Thread ID: 0x%lx (%s)\n", (long) lock_info->thread_id, lock_info->thread_name); pthread_mutex_lock(&lock_info->lock); for (i = 0; str && i < lock_info->num_locks; i++) {