From: Simon Marlow Date: Thu, 13 Nov 2008 15:45:42 +0000 (+0000) Subject: move an assertion X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=424e0afadc8ed00f96330d869b774acde2865c37;p=ghc-hetmet.git move an assertion --- diff --git a/rts/Capability.c b/rts/Capability.c index 9b5d81d..0b3c844 100644 --- a/rts/Capability.c +++ b/rts/Capability.c @@ -725,8 +725,6 @@ shutdownCapability (Capability *cap, Task *task, rtsBool safe) { nat i; - ASSERT(sched_state == SCHED_SHUTTING_DOWN); - task->cap = cap; // Loop indefinitely until all the workers have exited and there @@ -736,6 +734,8 @@ shutdownCapability (Capability *cap, Task *task, rtsBool safe) // isn't safe, for one thing). for (i = 0; /* i < 50 */; i++) { + ASSERT(sched_state == SCHED_SHUTTING_DOWN); + debugTrace(DEBUG_sched, "shutting down capability %d, attempt %d", cap->no, i); ACQUIRE_LOCK(&cap->lock);