[project @ 2005-11-03 15:15:14 by simonmar]
[ghc-hetmet.git] / ghc / rts / GCCompact.c
index d449794..775aa75 100644 (file)
@@ -955,11 +955,13 @@ compact( void (*get_roots)(evac_fn) )
     // any threads resurrected during this GC
     thread((StgPtr)&resurrected_threads);
 
-    // the main threads list
+    // the task list
     {
-       StgMainThread *m;
-       for (m = main_threads; m != NULL; m = m->link) {
-           thread((StgPtr)&m->tso);
+       Task *task;
+       for (task = all_tasks; task != NULL; task = task->all_link) {
+           if (task->tso) {
+               thread((StgPtr)&task->tso);
+           }
        }
     }