From 1f79c785975261e4158c9b85f6451d5bd00b2495 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 25 Jun 2009 16:03:28 +0200 Subject: named queue worker threads ... but I don't see the name anywhere...? --- runtime/wtp.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'runtime/wtp.c') diff --git a/runtime/wtp.c b/runtime/wtp.c index 218a5db6..02662cde 100644 --- a/runtime/wtp.c +++ b/runtime/wtp.c @@ -40,6 +40,7 @@ #include #include #include +#include #ifdef OS_SOLARIS # include @@ -433,6 +434,11 @@ wtpWorker(void *arg) /* the arg is actually a wti object, even though we are in sigfillset(&sigSet); pthread_sigmask(SIG_BLOCK, &sigSet, NULL); + /* set thread name - we ignore if the call fails, has no harsh consequences... */ + if(prctl(PR_SET_NAME, wtpGetDbgHdr(pThis), 0, 0, 0) != 0) { + DBGPRINTF("prctl failed, not setting thread name for '%s'\n", wtpGetDbgHdr(pThis)); + } + BEGIN_MTX_PROTECTED_OPERATIONS(&pThis->mut, LOCK_MUTEX); /* do some late initialization */ -- cgit