New implementation of BLACKHOLEs
[ghc-hetmet.git] / rts / sm / GC.c
index 63023b6..4d63724 100644 (file)
@@ -395,13 +395,6 @@ SET_GCT(gc_threads[0]);
       // The other threads are now stopped.  We might recurse back to
       // here, but from now on this is the only thread.
       
-      // if any blackholes are alive, make the threads that wait on
-      // them alive too.
-      if (traverseBlackholeQueue()) {
-         inc_running(); 
-         continue;
-      }
-  
       // must be last...  invariant is that everything is fully
       // scavenged at this point.
       if (traverseWeakPtrList()) { // returns rtsTrue if evaced something 
@@ -732,7 +725,6 @@ SET_GCT(gc_threads[0]);
   // send exceptions to any threads which were about to die 
   RELEASE_SM_LOCK;
   resurrectThreads(resurrected_threads);
-  performPendingThrowTos(exception_threads);
   ACQUIRE_SM_LOCK;
 
   // Update the stable pointer hash table.
@@ -997,6 +989,9 @@ any_work (void)
 #endif
 
     gct->no_work++;
+#if defined(THREADED_RTS)
+    yieldThread();
+#endif
 
     return rtsFalse;
 }    
@@ -1008,7 +1003,7 @@ scavenge_until_all_done (void)
        
 
 loop:
-    traceEvent(&capabilities[gct->thread_index], EVENT_GC_WORK);
+    traceEventGcWork(&capabilities[gct->thread_index]);
 
 #if defined(THREADED_RTS)
     if (n_gc_threads > 1) {
@@ -1023,7 +1018,7 @@ loop:
     // scavenge_loop() only exits when there's no work to do
     r = dec_running();
     
-    traceEvent(&capabilities[gct->thread_index], EVENT_GC_IDLE);
+    traceEventGcIdle(&capabilities[gct->thread_index]);
 
     debugTrace(DEBUG_gc, "%d GC threads still running", r);
     
@@ -1039,7 +1034,7 @@ loop:
         // scavenge_loop() to perform any pending work.
     }
     
-    traceEvent(&capabilities[gct->thread_index], EVENT_GC_DONE);
+    traceEventGcDone(&capabilities[gct->thread_index]);
 }
 
 #if defined(THREADED_RTS)