/* -----------------------------------------------------------------------------
- * $Id: TSO.h,v 1.15 2000/03/31 03:09:35 hwloidl Exp $
+ * $Id: TSO.h,v 1.17 2000/08/15 14:18:43 simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
StgClosure *closure;
struct StgTSO_ *tso;
int fd;
-#if defined(INTERPRETER) && !defined(HAVE_SETITIMER)
- unsigned int target;
-#else
+#if defined(HAVE_SETITIMER) || defined(mingw32_TARGET_OS)
unsigned int delay;
+#else
+ unsigned int target;
#endif
} StgTSOBlockInfo;
* 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;
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;
StgWord max_stack_size; /* maximum stack size in *words* */
StgPtr sp;
StgUpdateFrame* su;
- StgPtr splim;
StgWord stack[0];
} 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.