aboutsummaryrefslogtreecommitdiffstats
path: root/os/kernel/include/threads.h
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-02-02 20:20:12 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-02-02 20:20:12 +0000
commite515bcf581c92643c21eb6ed53ba0d0b1604fe4b (patch)
treeefae1098d4db1532fcf51f1387add77747ffc061 /os/kernel/include/threads.h
parentce91c3f44a3f0b9cacd07972a052c7360fb24053 (diff)
downloadChibiOS-e515bcf581c92643c21eb6ed53ba0d0b1604fe4b.tar.gz
ChibiOS-e515bcf581c92643c21eb6ed53ba0d0b1604fe4b.tar.bz2
ChibiOS-e515bcf581c92643c21eb6ed53ba0d0b1604fe4b.zip
Implemented registry subsystem (still in progress).
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1558 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/kernel/include/threads.h')
-rw-r--r--os/kernel/include/threads.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/os/kernel/include/threads.h b/os/kernel/include/threads.h
index a9209e6ea..24b79a3cd 100644
--- a/os/kernel/include/threads.h
+++ b/os/kernel/include/threads.h
@@ -53,13 +53,17 @@ struct Thread {
queue. */
/* End of the fields shared with the ThreadsQueue structure. */
tprio_t p_prio; /**< Thread priority. */
+ struct context p_ctx; /**< Processor context. */
+#if CH_USE_REGISTRY
+ Thread *p_newer; /**< Newer registry element. */
+ Thread *p_older; /**< Older registry element. */
+#endif
/* End of the fields shared with the ReadyList structure. */
#if CH_USE_DYNAMIC
trefs_t p_refs; /**< References to this thread. */
#endif
tstate_t p_state; /**< Current thread state. */
tmode_t p_flags; /**< Various thread flags. */
- struct context p_ctx; /**< Processor context. */
#if CH_USE_NESTED_LOCKS
cnt_t p_locks; /**< Number of nested locks. */
#endif
@@ -181,13 +185,19 @@ extern "C" {
}
#endif
-/** Returns the pointer to the @p Thread currently in execution.*/
+/**
+ * Returns a pointer to the current @p Thread.
+ */
#define chThdSelf() currp
-/** Returns the current thread priority.*/
+/**
+ * Returns the current thread priority.
+ */
#define chThdGetPriority() (currp->p_prio)
-/** Returns the pointer to the @p Thread local storage area, if any.*/
+/**
+ * Returns the pointer to the @p Thread local storage area, if any.
+ */
#define chThdLS() (void *)(currp + 1)
/**