aboutsummaryrefslogtreecommitdiffstats
path: root/os/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'os/kernel')
-rw-r--r--os/kernel/include/chregistry.h4
-rw-r--r--os/kernel/include/chschd.h6
-rw-r--r--os/kernel/src/chregistry.c2
-rw-r--r--os/kernel/src/chschd.c6
4 files changed, 9 insertions, 9 deletions
diff --git a/os/kernel/include/chregistry.h b/os/kernel/include/chregistry.h
index 0c4ba8eb9..956482a57 100644
--- a/os/kernel/include/chregistry.h
+++ b/os/kernel/include/chregistry.h
@@ -49,8 +49,8 @@
*/
#define REG_INSERT(tp) { \
(tp)->p_newer = (Thread *)&rlist; \
- (tp)->p_older = rlist.p_older; \
- (tp)->p_older->p_newer = rlist.p_older = (tp); \
+ (tp)->p_older = rlist.r_older; \
+ (tp)->p_older->p_newer = rlist.r_older = (tp); \
}
#ifdef __cplusplus
diff --git a/os/kernel/include/chschd.h b/os/kernel/include/chschd.h
index 3847c948e..8d8a2b36f 100644
--- a/os/kernel/include/chschd.h
+++ b/os/kernel/include/chschd.h
@@ -71,11 +71,11 @@ typedef struct {
ThreadsQueue r_queue; /**< @brief Threads queue. */
tprio_t r_prio; /**< @brief This field must be
initialized to zero. */
- struct context p_ctx; /**< @brief Not used, present because
+ struct context r_ctx; /**< @brief Not used, present because
offsets. */
#if CH_USE_REGISTRY
- Thread *p_newer; /**< @brief Newer registry element. */
- Thread *p_older; /**< @brief Older registry element. */
+ Thread *r_newer; /**< @brief Newer registry element. */
+ Thread *r_older; /**< @brief Older registry element. */
#endif
/* End of the fields shared with the Thread structure.*/
#if CH_TIME_QUANTUM > 0
diff --git a/os/kernel/src/chregistry.c b/os/kernel/src/chregistry.c
index ad5cd7fc1..c561d8ca6 100644
--- a/os/kernel/src/chregistry.c
+++ b/os/kernel/src/chregistry.c
@@ -64,7 +64,7 @@ Thread *chRegFirstThread(void) {
Thread *tp;
chSysLock();
- tp = rlist.p_newer;
+ tp = rlist.r_newer;
#if CH_USE_DYNAMIC
tp->p_refs++;
#endif
diff --git a/os/kernel/src/chschd.c b/os/kernel/src/chschd.c
index 7170fb0ec..cee046af2 100644
--- a/os/kernel/src/chschd.c
+++ b/os/kernel/src/chschd.c
@@ -51,7 +51,7 @@ void scheduler_init(void) {
rlist.r_preempt = CH_TIME_QUANTUM;
#endif
#if CH_USE_REGISTRY
- rlist.p_newer = rlist.p_older = (Thread *)&rlist;
+ rlist.r_newer = rlist.r_older = (Thread *)&rlist;
#endif
}
@@ -96,11 +96,11 @@ void chSchGoSleepS(tstate_t newstate) {
Thread *otp;
(otp = currp)->p_state = newstate;
- setcurrp(fifo_remove(&rlist.r_queue));
- currp->p_state = THD_STATE_CURRENT;
#if CH_TIME_QUANTUM > 0
rlist.r_preempt = CH_TIME_QUANTUM;
#endif
+ setcurrp(fifo_remove(&rlist.r_queue));
+ currp->p_state = THD_STATE_CURRENT;
chDbgTrace(currp, otp);
chSysSwitchI(currp, otp);
}