summaryrefslogtreecommitdiff
path: root/rts/Task.c
diff options
context:
space:
mode:
authorEdward Z. Yang <ezyang@mit.edu>2010-11-11 00:09:12 +0000
committerEdward Z. Yang <ezyang@mit.edu>2010-11-11 00:09:12 +0000
commit2c3e47bb5dc96ed5e0a17f49f8fe8e0abe986dcc (patch)
treedd3137d1bbf02b0953e1063926f10ae93a2f4a13 /rts/Task.c
parente3e12b2a298abf61299a536929307131e07128b7 (diff)
downloadhaskell-2c3e47bb5dc96ed5e0a17f49f8fe8e0abe986dcc.tar.gz
Use standard task ID print style (hexadecimal).
Diffstat (limited to 'rts/Task.c')
-rw-r--r--rts/Task.c24
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