diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-08-10 08:07:43 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-08-10 08:07:43 +0000 |
commit | c3dc5598c315f4650bfcd1e595104a2ace7aa87c (patch) | |
tree | 890774f4ca76e9729624adfc0254544791e9cecb /os/kernel/include/chschd.h | |
parent | 16712a78831d021d9ee40ade082aefafc9aea196 (diff) | |
download | ChibiOS-c3dc5598c315f4650bfcd1e595104a2ace7aa87c.tar.gz ChibiOS-c3dc5598c315f4650bfcd1e595104a2ace7aa87c.tar.bz2 ChibiOS-c3dc5598c315f4650bfcd1e595104a2ace7aa87c.zip |
Global variables consolidation.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6116 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/kernel/include/chschd.h')
-rw-r--r-- | os/kernel/include/chschd.h | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/os/kernel/include/chschd.h b/os/kernel/include/chschd.h index 0d12acdf0..248f707c8 100644 --- a/os/kernel/include/chschd.h +++ b/os/kernel/include/chschd.h @@ -87,26 +87,6 @@ /* Module data structures and types. */
/*===========================================================================*/
-/**
- * @extends threads_queue_t
- *
- * @brief Ready list header.
- */
-typedef struct {
- threads_queue_t r_queue; /**< @brief Threads queue. */
- tprio_t r_prio; /**< @brief This field must be
- initialized to zero. */
- struct context r_ctx; /**< @brief Not used, present because
- offsets. */
-#if CH_CFG_USE_REGISTRY || defined(__DOXYGEN__)
- thread_t *r_newer; /**< @brief Newer registry element. */
- thread_t *r_older; /**< @brief Older registry element. */
-#endif
- /* End of the fields shared with the thread_t structure.*/
- thread_t *r_current; /**< @brief The currently running
- thread. */
-} ready_list_t;
-
/*===========================================================================*/
/* Module macros. */
/*===========================================================================*/
@@ -125,7 +105,7 @@ typedef struct { * @note It is forbidden to use this macro in order to change the pointer
* (currp = something), use @p setcurrp() instead.
*/
-#define currp rlist.r_current
+#define currp ch.rlist.r_current
/**
* @brief Current thread pointer change macro.
@@ -140,10 +120,6 @@ typedef struct { /* External declarations. */
/*===========================================================================*/
-#if !defined(__DOXYGEN__)
-extern ready_list_t rlist;
-#endif
-
/*
* Scheduler APIs.
*/
@@ -179,7 +155,7 @@ static inline bool chSchIsRescRequiredI(void) { chDbgCheckClassI();
- return firstprio(&rlist.r_queue) > currp->p_prio;
+ return firstprio(&ch.rlist.r_queue) > currp->p_prio;
}
/**
@@ -193,7 +169,7 @@ static inline bool chSchCanYieldS(void) { chDbgCheckClassI();
- return firstprio(&rlist.r_queue) >= currp->p_prio;
+ return firstprio(&ch.rlist.r_queue) >= currp->p_prio;
}
/**
@@ -219,7 +195,7 @@ static inline void chSchDoYieldS(void) { * @special
*/
static inline void chSchPreemption(void) {
- tprio_t p1 = firstprio(&rlist.r_queue);
+ tprio_t p1 = firstprio(&ch.rlist.r_queue);
tprio_t p2 = currp->p_prio;
#if CH_CFG_TIME_QUANTUM > 0
|