Commit 0ee7214a authored by simonmar's avatar simonmar
Browse files

[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
parent 9334e393
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment