Commit 2109f5e2 authored by simonmar's avatar simonmar
Browse files

[project @ 2005-04-07 15:53:01 by simonmar]

resetNurseries: tidy up
parent 5a148f04
......@@ -368,13 +368,16 @@ void
resetNurseries( void )
{
bdescr *bd;
#ifdef SMP
Capability *cap;
#ifdef SMP
/* All tasks must be stopped */
ASSERT(rts_n_free_capabilities == RtsFlags.ParFlags.nNodes);
for (cap = free_capabilities; cap != NULL; cap = cap->link) {
for (cap = free_capabilities; cap != NULL; cap = cap->link)
#else
cap = &MainCapability;
#endif
{
for (bd = cap->r.rNursery; bd; bd = bd->link) {
bd->free = bd->start;
ASSERT(bd->gen_no == 0);
......@@ -383,16 +386,6 @@ resetNurseries( void )
}
cap->r.rCurrentNursery = cap->r.rNursery;
}
#else
for (bd = g0s0->blocks; bd; bd = bd->link) {
bd->free = bd->start;
ASSERT(bd->gen_no == 0);
ASSERT(bd->step == g0s0);
IF_DEBUG(sanity,memset(bd->start, 0xaa, BLOCK_SIZE));
}
MainCapability.r.rNursery = g0s0->blocks;
MainCapability.r.rCurrentNursery = g0s0->blocks;
#endif
}
bdescr *
......
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