Add a new primitive forkOn#, for forking a thread on a specific Capability
[ghc-hetmet.git] / ghc / includes / TSO.h
index 14c47ab..d096d40 100644 (file)
@@ -93,7 +93,13 @@ typedef StgWord32 StgThreadID;
  */
 #define TSO_DIRTY   1
 
-#define tsoDirty(tso) ((tso)->flags & TSO_DIRTY)
+/*
+ * TSO_LOCKED is set when a TSO is locked to a particular Capability.
+ */
+#define TSO_LOCKED  2
+
+#define tsoDirty(tso)  ((tso)->flags & TSO_DIRTY)
+#define tsoLocked(tso) ((tso)->flags & TSO_LOCKED)
 
 /*
  * Type returned after running a thread.  Values of this type