summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Marlow <simonmar@microsoft.com>2006-03-17 15:47:34 +0000
committerSimon Marlow <simonmar@microsoft.com>2006-03-17 15:47:34 +0000
commitfa9c11a2ca53679eec55187e45dd9c895f48251a (patch)
treeb55d09ae41a35290490f582245bfddd13f8efe60
parente6218fe7eff4e34e1a3c823cd4b7aebe09d2d4fb (diff)
downloadhaskell-fa9c11a2ca53679eec55187e45dd9c895f48251a.tar.gz
fix build for certain picky versions of gcc
-rw-r--r--ghc/rts/Task.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/ghc/rts/Task.c b/ghc/rts/Task.c
index 89db782800..7366480094 100644
--- a/ghc/rts/Task.c
+++ b/ghc/rts/Task.c
@@ -171,18 +171,18 @@ boundTaskExiting (Task *task)
IF_DEBUG(scheduler,sched_belch("task exiting"));
}
+#ifdef THREADED_RTS
+#define TASK_ID(t) (t)->id
+#else
+#define TASK_ID(t) (t)
+#endif
+
void
discardTask (Task *task)
{
ASSERT_LOCK_HELD(&sched_mutex);
if (!task->stopped) {
- IF_DEBUG(scheduler,sched_belch("discarding task %p",
-#ifdef THREADED_RTS
- (void *)task->id
-#else
- (void *)task
-#endif
- ));
+ IF_DEBUG(scheduler,sched_belch("discarding task %p", TASK_ID(task)));
task->cap = NULL;
task->tso = NULL;
task->stopped = rtsTrue;