From: Edward Z. Yang Date: Thu, 11 Nov 2010 00:09:12 +0000 (+0000) Subject: Use standard task ID print style (hexadecimal). X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=2c3e47bb5dc96ed5e0a17f49f8fe8e0abe986dcc Use standard task ID print style (hexadecimal). --- diff --git a/rts/Task.c b/rts/Task.c index f26785a..8994ad1 100644 --- a/rts/Task.c +++ b/rts/Task.c @@ -348,6 +348,17 @@ workerTaskStop (Task *task) #endif +#ifdef DEBUG + +static void *taskId(Task *task) +{ +#ifdef THREADED_RTS + return (void *)task->id; +#else + return (void *)task; +#endif +} + #if defined(THREADED_RTS) static void OSThreadProcAttr @@ -415,22 +426,11 @@ interruptWorkerTask (Task *task) ASSERT(osThreadId() != task->id); // seppuku not allowed ASSERT(task->incall->suspended_tso); // use this only for FFI calls interruptOSThread(task->id); - debugTrace(DEBUG_sched, "interrupted worker task %lu", task->id); + debugTrace(DEBUG_sched, "interrupted worker task %p", taskId(task)); } #endif /* THREADED_RTS */ -#ifdef DEBUG - -static void *taskId(Task *task) -{ -#ifdef THREADED_RTS - return (void *)task->id; -#else - return (void *)task; -#endif -} - void printAllTasks(void); void