-typedef enum {
- HeapOverflow, /* might also be StackOverflow */
- StackOverflow,
- ThreadYielding,
- ThreadBlocked,
- ThreadFinished
-} StgThreadReturnCode;
-
-/*
- * We distinguish between the various classes of threads in the system.
- */
-
-typedef enum {
- AdvisoryPriority,
- MandatoryPriority,
- RevalPriority
-} StgThreadPriority;
-
-/*
- * Threads may be blocked for several reasons. A blocked thread will
- * have the reason in the why_blocked field of the TSO, and some
- * further info (such as the closure the thread is blocked on, or the
- * file descriptor if the thread is waiting on I/O) in the block_info
- * field.
- */
-
-typedef enum {
- NotBlocked,
- BlockedOnMVar,
- BlockedOnBlackHole,
- BlockedOnException,
- BlockedOnRead,
- BlockedOnWrite,
- BlockedOnDelay
-#if defined(PAR)
- , BlockedOnGA // blocked on a remote closure represented by a Global Address
- , BlockedOnGA_NoSend // same as above but without sending a Fetch message
-#endif
-#if defined(RTS_SUPPORTS_THREADS)
- , BlockedOnCCall