X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=rts%2Fsm%2FGC.c;h=ec9cd0749d8ed62bf633945a1c231a0b81a57be3;hb=29fd0a47007971cd7def0d778faf3f5abb893d31;hp=2af5fa133b720b9d39e99366e2185e6115e85885;hpb=6a405b1efd138a4af4ed93ce4ff173a4c5704512;p=ghc-hetmet.git diff --git a/rts/sm/GC.c b/rts/sm/GC.c index 2af5fa1..ec9cd07 100644 --- a/rts/sm/GC.c +++ b/rts/sm/GC.c @@ -146,7 +146,6 @@ static nat inc_running (void); static nat dec_running (void); static void wakeup_gc_threads (nat n_threads, nat me); static void shutdown_gc_threads (nat n_threads, nat me); -static void continue_gc_threads (nat n_threads, nat me); #if 0 && defined(DEBUG) static void gcCAFs (void); @@ -266,7 +265,7 @@ GarbageCollect (rtsBool force_major_gc, // check stack sanity *before* GC IF_DEBUG(sanity, checkFreeListSanity()); - IF_DEBUG(sanity, checkMutableLists()); + IF_DEBUG(sanity, checkMutableLists(rtsTrue)); // Initialise all our gc_thread structures for (t = 0; t < n_gc_threads; t++) { @@ -787,8 +786,6 @@ GarbageCollect (rtsBool force_major_gc, } #endif - continue_gc_threads(n_gc_threads, gct->thread_index); - RELEASE_SM_LOCK; gct = saved_gct; @@ -1144,14 +1141,17 @@ shutdown_gc_threads (nat n_threads USED_IF_THREADS, nat me USED_IF_THREADS) #endif } -static void -continue_gc_threads (nat n_threads USED_IF_THREADS, nat me USED_IF_THREADS) +void +releaseGCThreads (Capability *cap USED_IF_THREADS) { #if defined(THREADED_RTS) + nat n_threads = RtsFlags.ParFlags.nNodes; + nat me = cap->no; nat i; for (i=0; i < n_threads; i++) { if (i == me) continue; - if (gc_threads[i]->wakeup != GC_THREAD_WAITING_TO_CONTINUE) barf("continue_gc_threads"); + if (gc_threads[i]->wakeup != GC_THREAD_WAITING_TO_CONTINUE) + barf("releaseGCThreads"); gc_threads[i]->wakeup = GC_THREAD_INACTIVE; ACQUIRE_SPIN_LOCK(&gc_threads[i]->gc_spin);