From 2ca1379641d1ffef330e48f124abaa4983837c9b Mon Sep 17 00:00:00 2001 From: simonmar Date: Mon, 15 Dec 2003 16:45:23 +0000 Subject: [PATCH] [project @ 2003-12-15 16:45:23 by simonmar] Add assertion. --- ghc/rts/Capability.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ghc/rts/Capability.c b/ghc/rts/Capability.c index 1d78982..6d2f43c 100644 --- a/ghc/rts/Capability.c +++ b/ghc/rts/Capability.c @@ -150,9 +150,7 @@ void grabCapability(Capability** cap) free_capabilities = (*cap)->link; rts_n_free_capabilities--; #endif -#ifdef RTS_SUPPORTS_THREADS - IF_DEBUG(scheduler, sched_belch("worker: got capability")); -#endif + IF_DEBUG(scheduler, sched_belch("worker: got capability")); } /* @@ -362,6 +360,7 @@ passCapability(Mutex* pMutex, Capability* cap, Condition *pTargetThreadCond) #ifdef SMP #error SMP version not implemented #endif + ASSERT(rts_n_free_capabilities == 0); rts_n_free_capabilities = 1; signalCondition(pTargetThreadCond); passTarget = pTargetThreadCond; -- 1.7.10.4