X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FGCCompact.c;h=ea2e474a1dd797e3fd0dc0f62197259c4f3702b8;hb=97906cfcc30dd591e840921d336fdabeb1b8a315;hp=dfb381ddf3cb813935314eeb97c25a4ff322b152;hpb=e4ffa112ba48239e89eddc54edb0133b7bc3b283;p=ghc-hetmet.git diff --git a/ghc/rts/GCCompact.c b/ghc/rts/GCCompact.c index dfb381d..ea2e474 100644 --- a/ghc/rts/GCCompact.c +++ b/ghc/rts/GCCompact.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: GCCompact.c,v 1.11 2001/12/11 12:03:23 simonmar Exp $ + * $Id: GCCompact.c,v 1.12 2002/03/12 11:51:06 simonmar Exp $ * * (c) The GHC Team 2001 * @@ -849,7 +849,6 @@ compact( void (*get_roots)(evac_fn) ) { nat g, s, blocks; step *stp; - extern StgWeak *old_weak_ptr_list; // tmp // 1. thread the roots get_roots((evac_fn)thread); @@ -871,6 +870,17 @@ compact( void (*get_roots)(evac_fn) ) // the global thread list thread((StgPtr)&all_threads); + // any threads resurrected during this GC + thread((StgPtr)&resurrected_threads); + + // the main threads list + { + StgMainThread *m; + for (m = main_threads; m != NULL; m = m->link) { + thread((StgPtr)&m->tso); + } + } + // the static objects thread_static(scavenged_static_objects);