assert: no 0x before thread id

There's no 0x prefix in the log lines either.  This makes it easier to
copy/paste word and search.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
This commit is contained in:
Sage Weil 2011-10-16 10:36:31 -07:00
parent 5de847f31e
commit 0aa40ea06e
2 changed files with 5 additions and 5 deletions

View File

@ -52,9 +52,9 @@ namespace ceph {
char buf[8096];
BackTrace *bt = new BackTrace(1);
snprintf(buf, sizeof(buf),
"%s: In function '%s', in thread '%p'\n"
"%s: In function '%s', in thread '%llx'\n"
"%s: %d: FAILED assert(%s)\n",
file, func, (void*)pthread_self(), file, line, assertion);
file, func, (unsigned long long)pthread_self(), file, line, assertion);
dout_emergency(buf);
// TODO: get rid of this memory allocation.

View File

@ -77,8 +77,8 @@ static void handle_shutdown_signal(int signum)
{
char buf[1024];
snprintf(buf, sizeof(buf), "*** Caught signal (%s) **\n "
"in thread %p. Shutting down.\n",
sys_siglist[signum], (void*)pthread_self());
"in thread %llx. Shutting down.\n",
sys_siglist[signum], (unsigned long long)pthread_self());
dout_emergency(buf);
pidfile_remove();
reraise_fatal(signum);
@ -91,7 +91,7 @@ static void handle_fatal_signal(int signum)
// presumably dump core-- will handle it.
char buf[1024];
snprintf(buf, sizeof(buf), "*** Caught signal (%s) **\n "
"in thread %p\n", sys_siglist[signum], (void*)pthread_self());
"in thread %llx\n", sys_siglist[signum], (unsigned long long)pthread_self());
dout_emergency(buf);
pidfile_remove();