NCG: Split out joinToTargets from linear alloctor into its own module.
[ghc-hetmet.git] / rts / Threads.c
index a9d4a72..2c7b2be 100644 (file)
@@ -507,14 +507,14 @@ unblockOne_ (Capability *cap, StgTSO *tso,
       appendToRunQueue(cap,tso);
       // we're holding a newly woken thread, make sure we context switch
       // quickly so we can migrate it if necessary.
-      context_switch = 1;
+      cap->context_switch = 1;
   } else {
       // we'll try to wake it up on the Capability it was last on.
       wakeupThreadOnCapability(cap, tso->cap, tso);
   }
 #else
   appendToRunQueue(cap,tso);
-  context_switch = 1;
+  cap->context_switch = 1;
 #endif
 
   debugTrace(DEBUG_sched,
@@ -763,6 +763,11 @@ printThreadStatus(StgTSO *t)
        default:
            printThreadBlockage(t);
        }
+        if (t->flags & TSO_DIRTY) {
+            debugBelch(" (TSO_DIRTY)");
+        } else if (t->flags & TSO_LINK_DIRTY) {
+            debugBelch(" (TSO_LINK_DIRTY)");
+        }
        debugBelch("\n");
     }
 }