- StgHeader header;
-
- struct StgTSO_* link; /* Links threads onto blocking queues */
- StgMutClosure * mut_link; /* TSO's are mutable of course! */
- struct StgTSO_* global_link; /* Links all threads together */
-
- StgTSOWhatNext what_next : 16;
- StgTSOBlockReason why_blocked : 16;
- StgTSOBlockInfo block_info;
- struct StgTSO_* blocked_exceptions;
- StgThreadID id;
- int saved_errno;
-
- MAYBE_EMPTY_STRUCT(StgTSOTickyInfo,ticky)
- MAYBE_EMPTY_STRUCT(StgTSOProfInfo,prof)
- MAYBE_EMPTY_STRUCT(StgTSOParInfo,par)
- MAYBE_EMPTY_STRUCT(StgTSOGranInfo,gran)
- MAYBE_EMPTY_STRUCT(StgTSODistInfo,dist)
+ StgHeader header;
+
+ struct StgTSO_* link; /* Links threads onto blocking queues */
+ struct StgTSO_* global_link; /* Links all threads together */
+
+ StgWord16 what_next; /* Values defined in Constants.h */
+ StgWord16 why_blocked; /* Values defined in Constants.h */
+ StgWord32 flags;
+ StgTSOBlockInfo block_info;
+ struct StgTSO_* blocked_exceptions;
+ StgThreadID id;
+ int saved_errno;
+ struct Task_* bound;
+ struct Capability_* cap;
+ struct StgTRecHeader_ * trec; /* STM transaction record */
+
+#ifdef TICKY_TICKY
+ /* TICKY-specific stuff would go here. */
+#endif
+#ifdef PROFILING
+ StgTSOProfInfo prof;
+#endif
+#ifdef PAR
+ StgTSOParInfo par;
+#endif
+#ifdef GRAN
+ StgTSOGranInfo gran;
+#endif
+#ifdef DIST
+ StgTSODistInfo dist;
+#endif
+
+ /* The thread stack... */
+ StgWord32 stack_size; /* stack size in *words* */
+ StgWord32 max_stack_size; /* maximum stack size in *words* */
+ StgPtr sp;