diff options
author | Edward Z. Yang <ezyang@mit.edu> | 2010-11-11 00:09:12 +0000 |
---|---|---|
committer | Edward Z. Yang <ezyang@mit.edu> | 2010-11-11 00:09:12 +0000 |
commit | 2c3e47bb5dc96ed5e0a17f49f8fe8e0abe986dcc (patch) | |
tree | dd3137d1bbf02b0953e1063926f10ae93a2f4a13 /rts/Task.c | |
parent | e3e12b2a298abf61299a536929307131e07128b7 (diff) | |
download | haskell-2c3e47bb5dc96ed5e0a17f49f8fe8e0abe986dcc.tar.gz |
Use standard task ID print style (hexadecimal).
Diffstat (limited to 'rts/Task.c')
-rw-r--r-- | rts/Task.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/rts/Task.c b/rts/Task.c index f26785a1be..8994ad153e 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 |