RTS tidyup sweep, first phase
[ghc-hetmet.git] / includes / rts / storage / TSO.h
similarity index 90%
rename from includes/TSO.h
rename to includes/rts/storage/TSO.h
index af624f7..7cb2459 100644 (file)
@@ -1,36 +1,13 @@
 /* -----------------------------------------------------------------------------
  *
- * (c) The GHC Team, 1998-1999
+ * (c) The GHC Team, 1998-2009
  *
  * The definitions for Thread State Objects.
  *
  * ---------------------------------------------------------------------------*/
 
-#ifndef TSO_H
-#define TSO_H
-
-#if DEBUG
-#define TSO_MAGIC 4321
-#endif
-
-typedef struct {
-  StgInt   pri;
-  StgInt   magic;
-  StgInt   sparkname;
-  rtsTime  startedat;
-  rtsBool  exported;
-  StgInt   basicblocks;
-  StgInt   allocs;
-  rtsTime  exectime;
-  rtsTime  fetchtime;
-  rtsTime  fetchcount;
-  rtsTime  blocktime;
-  StgInt   blockcount;
-  rtsTime  blockedat;
-  StgInt   globalsparks;
-  StgInt   localsparks;
-  rtsTime  clock;
-} StgTSOStatBuf;
+#ifndef RTS_STORAGE_TSO_H
+#define RTS_STORAGE_TSO_H
 
 /*
  * PROFILING info in a TSO
@@ -146,14 +123,14 @@ typedef struct StgTSO_ {
     StgPtr             sp;
     
     StgWord            stack[FLEXIBLE_ARRAY];
-} StgTSO;
+} *StgTSOPtr;
 
 /* -----------------------------------------------------------------------------
    functions
    -------------------------------------------------------------------------- */
 
-extern void dirty_TSO  (Capability *cap, StgTSO *tso);
-extern void setTSOLink (Capability *cap, StgTSO *tso, StgTSO *target);
+void dirty_TSO  (Capability *cap, StgTSO *tso);
+void setTSOLink (Capability *cap, StgTSO *tso, StgTSO *target);
 
 /* -----------------------------------------------------------------------------
    Invariants:
@@ -174,7 +151,7 @@ extern void setTSOLink (Capability *cap, StgTSO *tso, StgTSO *target);
         ----------------------------------------------------------------------
        NotBlocked             NULL                 runnable_queue, or running
        
-        BlockedOnBlackHole     the BLACKHOLE_BQ     the BLACKHOLE_BQ's queue
+        BlockedOnBlackHole     the BLACKHOLE        blackhole_queue
        
         BlockedOnMVar          the MVAR             the MVAR's queue
 
@@ -226,4 +203,4 @@ extern StgTSO dummy_tso;
 /* this is the NIL ptr for a TSO queue (e.g. runnable queue) */
 #define END_TSO_QUEUE  ((StgTSO *)(void*)&stg_END_TSO_QUEUE_closure)
 
-#endif /* TSO_H */
+#endif /* RTS_STORAGE_TSO_H */