aboutsummaryrefslogtreecommitdiffstats
path: root/os/kernel/include/chthreads.h
diff options
context:
space:
mode:
Diffstat (limited to 'os/kernel/include/chthreads.h')
-rw-r--r--os/kernel/include/chthreads.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/os/kernel/include/chthreads.h b/os/kernel/include/chthreads.h
index 9eeff8666..1e659b768 100644
--- a/os/kernel/include/chthreads.h
+++ b/os/kernel/include/chthreads.h
@@ -251,6 +251,15 @@ extern "C" {
#define chThdGetPriority() (currp->p_prio)
/**
+ * @brief Returns the number of ticks consumed by the specified thread.
+ * @note This function is only available when the
+ * @p CH_DBG_THREADS_PROFILING configuration option is enabled.
+ *
+ * @param[in] tp the pointer to the thread
+ */
+#define chThdGetTicks(tp) ((tp)->p_time)
+
+/**
* @brief Returns the pointer to the @p Thread local storage area, if any.
*/
#define chThdLS() (void *)(currp + 1)