X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FCapability.c;h=f4fdd70ed92e01fadc27bec73169cadca7817416;hb=f4b727487a65e6b611bbaafbd2207bd63a8df706;hp=8cfcba0b88c34fc6e3ad4c7b865041ff62b0601f;hpb=03a58fc9816fbd5df44adb9d77afdbf9944cc120;p=ghc-hetmet.git diff --git a/rts/Capability.c b/rts/Capability.c index 8cfcba0..f4fdd70 100644 --- a/rts/Capability.c +++ b/rts/Capability.c @@ -77,7 +77,7 @@ findSpark (Capability *cap) rtsBool retry; nat i = 0; - if (!emptyRunQueue(cap)) { + if (!emptyRunQueue(cap) || cap->returning_tasks_hd != NULL) { // If there are other threads, don't try to run any new // sparks: sparks might be speculative, we don't want to take // resources away from the main computation. @@ -213,7 +213,6 @@ initCapability( Capability *cap, nat i ) cap->no = i; cap->in_haskell = rtsFalse; - cap->in_gc = rtsFalse; cap->run_queue_hd = END_TSO_QUEUE; cap->run_queue_tl = END_TSO_QUEUE; @@ -253,6 +252,7 @@ initCapability( Capability *cap, nat i ) cap->free_trec_headers = NO_TREC; cap->transaction_tokens = 0; cap->context_switch = 0; + cap->pinned_object_block = NULL; } /* --------------------------------------------------------------------------- @@ -830,6 +830,7 @@ static void freeCapability (Capability *cap) { stgFree(cap->mut_lists); + stgFree(cap->saved_mut_lists); #if defined(THREADED_RTS) freeSparkPool(cap->sparks); #endif