diff options
Diffstat (limited to 'os/kernel/include/chthreads.h')
-rw-r--r-- | os/kernel/include/chthreads.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/os/kernel/include/chthreads.h b/os/kernel/include/chthreads.h index 9748166b9..97e03840b 100644 --- a/os/kernel/include/chthreads.h +++ b/os/kernel/include/chthreads.h @@ -244,11 +244,15 @@ extern "C" { /**
* @brief Returns a pointer to the current @p Thread.
+ *
+ * @api
*/
#define chThdSelf() currp
/**
* @brief Returns the current thread priority.
+ *
+ * @api
*/
#define chThdGetPriority() (currp->p_prio)
@@ -258,11 +262,15 @@ extern "C" { * @p CH_DBG_THREADS_PROFILING configuration option is enabled.
*
* @param[in] tp the pointer to the thread
+ *
+ * @api
*/
#define chThdGetTicks(tp) ((tp)->p_time)
/**
* @brief Returns the pointer to the @p Thread local storage area, if any.
+ *
+ * @api
*/
#define chThdLS() (void *)(currp + 1)
@@ -272,6 +280,8 @@ extern "C" { * @param[in] tp the pointer to the thread
* @retval TRUE thread terminated.
* @retval FALSE thread not terminated.
+ *
+ * @api
*/
#define chThdTerminated(tp) ((tp)->p_state == THD_STATE_FINAL)
@@ -280,6 +290,8 @@ extern "C" { *
* @retval TRUE termination request pended.
* @retval FALSE termination request not pended.
+ *
+ * @api
*/
#define chThdShouldTerminate() (currp->p_flags & THD_TERMINATE)
@@ -287,6 +299,8 @@ extern "C" { * @brief Resumes a thread created with @p chThdInit().
*
* @param[in] tp the pointer to the thread
+ *
+ * @iclass
*/
#define chThdResumeI(tp) chSchReadyI(tp)
@@ -301,6 +315,8 @@ extern "C" { * interpreted as a normal time specification not as
* an immediate timeout specification.
* .
+ *
+ * @sclass
*/
#define chThdSleepS(time) chSchGoSleepTimeoutS(THD_STATE_SLEEPING, time)
@@ -311,6 +327,8 @@ extern "C" { * @note The maximum specified value is implementation dependent.
*
* @param[in] sec the time in seconds
+ *
+ * @api
*/
#define chThdSleepSeconds(sec) chThdSleep(S2ST(sec))
@@ -322,6 +340,8 @@ extern "C" { * @note The maximum specified value is implementation dependent.
*
* @param[in] msec the time in milliseconds
+ *
+ * @api
*/
#define chThdSleepMilliseconds(msec) chThdSleep(MS2ST(msec))
@@ -333,6 +353,8 @@ extern "C" { * @note The maximum specified value is implementation dependent.
*
* @param[in] usec the time in microseconds
+ *
+ * @api
*/
#define chThdSleepMicroseconds(usec) chThdSleep(US2ST(usec))
|