diff options
Diffstat (limited to 'os/kernel/include/chthreads.h')
-rw-r--r-- | os/kernel/include/chthreads.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/os/kernel/include/chthreads.h b/os/kernel/include/chthreads.h index 582b4e1e1..5848d5643 100644 --- a/os/kernel/include/chthreads.h +++ b/os/kernel/include/chthreads.h @@ -51,6 +51,16 @@ #define THD_STATE_WTMSG 12 /**< @brief Waiting for a message. */
#define THD_STATE_WTQUEUE 13 /**< @brief Waiting on an I/O queue. */
#define THD_STATE_FINAL 14 /**< @brief Thread terminated. */
+
+/**
+ * @brief Thread states as array of strings.
+ * @details Each element in an array initialized with this macro can be
+ * indexed using the numeric thread state values.
+ */
+#define THD_STATE_NAMES \
+ "READY", "CURRENT", "SUSPENDED", "WTSEM", "WTMTX", "WTCOND", "SLEEPING", \
+ "WTEXIT", "WTOREVT", "WTANDEVT", "SNDMSGQ", "SNDMSG", "WTMSG", "WTQUEUE", \
+ "FINAL"
/** @} */
/**
|