From: simonmar Date: Wed, 12 Oct 2005 14:10:12 +0000 (+0000) Subject: [project @ 2005-10-12 14:10:12 by simonmar] X-Git-Tag: Initial_conversion_from_CVS_complete~173 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=0ee7214a53526ffe44caefd0bd78371179e67910 [project @ 2005-10-12 14:10:12 by simonmar] - we should be acquiring the sm_lock around allocGroup() - sanity check threads as they are pulled off the blackhole_queue --- diff --git a/ghc/rts/Schedule.c b/ghc/rts/Schedule.c index 49c28e6..cbbc21e 100644 --- a/ghc/rts/Schedule.c +++ b/ghc/rts/Schedule.c @@ -1486,7 +1486,9 @@ scheduleHandleHeapOverflow( Capability *cap, StgTSO *t ) cap->r.rNursery->n_blocks == 1) { // paranoia to prevent infinite loop // if the nursery has only one block. + ACQUIRE_SM_LOCK bd = allocGroup( blocks ); + RELEASE_SM_LOCK cap->r.rNursery->n_blocks += blocks; // link the new group into the list @@ -3610,6 +3612,7 @@ checkBlackHoles( void ) ASSERT(t->why_blocked == BlockedOnBlackHole); type = get_itbl(t->block_info.closure)->type; if (type != BLACKHOLE && type != CAF_BLACKHOLE) { + IF_DEBUG(sanity,checkTSO(t)); t = unblockOneLocked(t); *prev = t; any_woke_up = rtsTrue;