[project @ 2001-03-06 15:00:25 by rrt]
[ghc-hetmet.git] / ghc / includes / TSO.h
index 6572a7e..1f7aa8e 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: TSO.h,v 1.16 2000/05/26 10:14:33 sewardj Exp $
+ * $Id: TSO.h,v 1.19 2000/12/14 15:19:47 sewardj Exp $
  *
  * (c) The GHC Team, 1998-1999
  *
@@ -80,7 +80,7 @@ typedef enum {
 typedef enum {
   ThreadEnterGHC,              /* enter top thunk on stack */
   ThreadRunGHC,                        /* return to address on top of stack */
-  ThreadEnterHugs,             /* enter top thunk on stack (w/ interpreter) */
+  ThreadEnterInterp,           /* enter top thunk on stack (w/ interpreter) */
   ThreadKilled,                        /* thread has died, don't run it */
   ThreadRelocated,             /* thread has moved, link points to new locn */
   ThreadComplete               /* thread has finished */
@@ -134,11 +134,7 @@ typedef union {
   StgClosure *closure;
   struct StgTSO_ *tso;
   int fd;
-#if defined(HAVE_SETITIMER) || defined(mingw32_TARGET_OS)
-  unsigned int delay;
-#else
   unsigned int target;
-#endif
 } StgTSOBlockInfo;
 
 /*
@@ -147,6 +143,10 @@ typedef union {
  * storage manager, and won't be copied during garbage collection.
  */
 
+/* 
+ * ToDo: make this structure sensible on a non-32-bit arch.
+ */
+
 typedef struct StgTSO_ {
   StgHeader          header;
 
@@ -154,11 +154,12 @@ typedef struct StgTSO_ {
   StgMutClosure *    mut_link;      /* TSO's are mutable of course! */
   struct StgTSO_*    global_link;    /* Links all threads together */
   
-  StgTSOWhatNext     what_next;
-  StgTSOBlockReason  why_blocked;
+  StgTSOWhatNext     what_next   : 16;
+  StgTSOBlockReason  why_blocked : 16;
   StgTSOBlockInfo    block_info;
   struct StgTSO_*    blocked_exceptions;
   StgThreadID        id;
+
   StgTSOTickyInfo    ticky; 
   StgTSOProfInfo     prof;
   StgTSOParInfo      par;
@@ -169,7 +170,6 @@ typedef struct StgTSO_ {
   StgWord            max_stack_size; /* maximum stack size in *words* */
   StgPtr             sp;
   StgUpdateFrame*    su;
-  StgPtr             splim;
   
   StgWord            stack[0];
 } StgTSO;
@@ -181,7 +181,6 @@ typedef struct StgTSO_ {
 
       tso->stack < tso->sp < tso->stack+tso->stack_size
       tso->stack_size <= tso->max_stack_size
-      tso->splim == tso->stack + RESERVED_STACK_WORDS;
       
       RESERVED_STACK_WORDS is large enough for any heap-check or
       stack-check failure.