Undo fix for #2185: sparks really should be treated as roots
[ghc-hetmet.git] / rts / Capability.c
index fa7f630..4445324 100644 (file)
@@ -791,8 +791,12 @@ markSomeCapabilities (evac_fn evac, void *user, nat i0, nat delta)
                       "evac'ing suspended TSO %lu", (unsigned long)task->suspended_tso->id);
            evac(user, (StgClosure **)(void *)&task->suspended_tso);
        }
+
+#if defined(THREADED_RTS)
+        markSparkQueue (evac, user, cap);
+#endif
     }
-    
+
 #if !defined(THREADED_RTS)
     evac(user, (StgClosure **)(void *)&blocked_queue_hd);
     evac(user, (StgClosure **)(void *)&blocked_queue_tl);
@@ -800,20 +804,6 @@ markSomeCapabilities (evac_fn evac, void *user, nat i0, nat delta)
 #endif 
 }
 
-// Sparks are not roots for GC, so we don't mark them in
-// markSomeCapabilities().  Instead, we traverse the spark queues
-// after GC and throw away any that are unreachable.
-void
-updateCapabilitiesPostGC (void)
-{
-#if defined(THREADED_RTS)
-    nat i;
-    for (i = 0; i < n_capabilities; i++) {
-        updateSparkQueue (&capabilities[i]);
-    }
-#endif // THREADED_RTS
-}
-
 // This function is used by the compacting GC to thread all the
 // pointers from spark queues.
 void