aboutsummaryrefslogtreecommitdiffstats
path: root/os/kernel/src/chschd.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-03-19 15:45:25 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-03-19 15:45:25 +0000
commitb61fb43e6cc681f9fc53a5efb116accc13e0d35d (patch)
tree72204bcadeb6fb6aa0dbc70777583cc11db2cd61 /os/kernel/src/chschd.c
parent79075f9e81d9d56be5da3bf6cdae56f4ace950de (diff)
downloadChibiOS-b61fb43e6cc681f9fc53a5efb116accc13e0d35d.tar.gz
ChibiOS-b61fb43e6cc681f9fc53a5efb116accc13e0d35d.tar.bz2
ChibiOS-b61fb43e6cc681f9fc53a5efb116accc13e0d35d.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1756 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/kernel/src/chschd.c')
-rw-r--r--os/kernel/src/chschd.c6
1 files changed, 3 insertions, 3 deletions
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);
}