aboutsummaryrefslogtreecommitdiffstats
path: root/os/kernel/src
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-03-15 16:04:47 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2010-03-15 16:04:47 +0000
commit8cf7b70436de8a93b2a0b3ddaeffbc7bfe4a5666 (patch)
tree15496cdba0714bcb32bdb79e8e2c006edd79c031 /os/kernel/src
parent3fe6ae7cac5c99c6f4a9e59febaab5a70f116b22 (diff)
downloadChibiOS-8cf7b70436de8a93b2a0b3ddaeffbc7bfe4a5666.tar.gz
ChibiOS-8cf7b70436de8a93b2a0b3ddaeffbc7bfe4a5666.tar.bz2
ChibiOS-8cf7b70436de8a93b2a0b3ddaeffbc7bfe4a5666.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1743 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/kernel/src')
-rw-r--r--os/kernel/src/chschd.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/os/kernel/src/chschd.c b/os/kernel/src/chschd.c
index 441559c36..412467b65 100644
--- a/os/kernel/src/chschd.c
+++ b/os/kernel/src/chschd.c
@@ -196,16 +196,17 @@ void chSchWakeupS(Thread *ntp, msg_t msg) {
* to @p TRUE.
*/
void chSchDoRescheduleI(void) {
+ Thread *otp, *ntp;
- Thread *otp = currp;
- /* Pick the first thread from the ready queue and makes it current.*/
- (currp = fifo_remove(&rlist.r_queue))->p_state = THD_STATE_CURRENT;
- chSchReadyI(otp);
#if CH_TIME_QUANTUM > 0
rlist.r_preempt = CH_TIME_QUANTUM;
#endif
- chDbgTrace(currp, otp);
- chSysSwitchI(currp, otp);
+ otp = currp;
+ /* Pick the first thread from the ready queue and makes it current.*/
+ (currp = ntp = fifo_remove(&rlist.r_queue))->p_state = THD_STATE_CURRENT;
+ chSchReadyI(otp);
+ chDbgTrace(ntp, otp);
+ chSysSwitchI(ntp, otp);
}
/**