From 295f370672c3238bc166743261f067bd8fe80cc4 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Fri, 19 Mar 2010 20:27:40 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1758 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/kernel/src/chschd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'os/kernel/src/chschd.c') diff --git a/os/kernel/src/chschd.c b/os/kernel/src/chschd.c index cee046af2..c75f099f6 100644 --- a/os/kernel/src/chschd.c +++ b/os/kernel/src/chschd.c @@ -212,18 +212,18 @@ void chSchWakeupS(Thread *ntp, msg_t msg) { */ #if !defined(PORT_OPTIMIZED_DORESCHEDULEI) || defined(__DOXYGEN__) void chSchDoRescheduleI(void) { - Thread *otp, *ntp; + Thread *otp; #if CH_TIME_QUANTUM > 0 rlist.r_preempt = CH_TIME_QUANTUM; #endif otp = currp; /* Picks the first thread from the ready queue and makes it current.*/ - (ntp = fifo_remove(&rlist.r_queue))->p_state = THD_STATE_CURRENT; - setcurrp(ntp); + setcurrp(fifo_remove(&rlist.r_queue)); + currp->p_state = THD_STATE_CURRENT; chSchReadyI(otp); - chDbgTrace(ntp, otp); - chSysSwitchI(ntp, otp); + chDbgTrace(currp, otp); + chSysSwitchI(currp, otp); } #endif /* !defined(PORT_OPTIMIZED_DORESCHEDULEI) */ -- cgit v1.2.3