aboutsummaryrefslogtreecommitdiffstats
path: root/os/kernel/include/chthreads.h
diff options
context:
space:
mode:
authorbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-11-27 19:55:59 +0000
committerbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-11-27 19:55:59 +0000
commit47654dcc4c7b8b1cc6c1fc5ec160cd18a449c215 (patch)
treefb344c8f0a469e5eb68701f08e417d1037215081 /os/kernel/include/chthreads.h
parent076e7453bf812c59f38cda94dd0379b6f03af0d0 (diff)
parente5ce81050f699c61b43aa74384d011c861fb31f2 (diff)
downloadChibiOS-47654dcc4c7b8b1cc6c1fc5ec160cd18a449c215.tar.gz
ChibiOS-47654dcc4c7b8b1cc6c1fc5ec160cd18a449c215.tar.bz2
ChibiOS-47654dcc4c7b8b1cc6c1fc5ec160cd18a449c215.zip
I2C branch. Goals: DMA-based driver, stm32f4x port.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/i2c_dev@3541 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/kernel/include/chthreads.h')
-rw-r--r--os/kernel/include/chthreads.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/os/kernel/include/chthreads.h b/os/kernel/include/chthreads.h
index bd3f21296..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"
/** @} */
/**
@@ -291,7 +301,7 @@ typedef msg_t (*tfunc_t)(void *);
* system clock.
* @note The maximum specified value is implementation dependent.
*
- * @param[in] sec time in seconds
+ * @param[in] sec time in seconds, must be different from zero
*
* @api
*/
@@ -304,7 +314,7 @@ typedef msg_t (*tfunc_t)(void *);
* system clock.
* @note The maximum specified value is implementation dependent.
*
- * @param[in] msec time in milliseconds
+ * @param[in] msec time in milliseconds, must be different from zero
*
* @api
*/
@@ -317,7 +327,7 @@ typedef msg_t (*tfunc_t)(void *);
* system clock.
* @note The maximum specified value is implementation dependent.
*
- * @param[in] usec time in microseconds
+ * @param[in] usec time in microseconds, must be different from zero
*
* @api
*/
@@ -345,6 +355,7 @@ extern "C" {
void chThdSleepUntil(systime_t time);
void chThdYield(void);
void chThdExit(msg_t msg);
+ void chThdExitS(msg_t msg);
#if CH_USE_WAITEXIT
msg_t chThdWait(Thread *tp);
#endif