From 17d48fc49986af1e8e1cc2150213fe4f6111d7c6 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Sun, 13 Jan 2013 12:14:58 +0100 Subject: added capability to output thread-id-to-function debug info This is a useful debug aid, but nothing of concern for regular users. --- threads.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'threads.c') diff --git a/threads.c b/threads.c index aea5de9f..e5006e90 100644 --- a/threads.c +++ b/threads.c @@ -183,9 +183,11 @@ static void* thrdStarter(void *arg) assert(pThis != NULL); assert(pThis->pUsrThrdMain != NULL); + ustrncpy(thrdName+3, pThis->name, 20); + dbgOutputTID((char*)thrdName); + # if HAVE_PRCTL && defined PR_SET_NAME /* set thread name - we ignore if the call fails, has no harsh consequences... */ - ustrncpy(thrdName+3, pThis->name, 20); if(prctl(PR_SET_NAME, thrdName, 0, 0, 0) != 0) { DBGPRINTF("prctl failed, not setting thread name for '%s'\n", pThis->name); } else { -- cgit v1.2.3