From 8cf7b70436de8a93b2a0b3ddaeffbc7bfe4a5666 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Mon, 15 Mar 2010 16:04:47 +0000 Subject: [PATCH] git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1743 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- docs/reports/SPC563M64-80.txt | 8 ++++---- os/kernel/src/chschd.c | 13 +++++++------ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/docs/reports/SPC563M64-80.txt b/docs/reports/SPC563M64-80.txt index 79c34e48b..2b4930c77 100644 --- a/docs/reports/SPC563M64-80.txt +++ b/docs/reports/SPC563M64-80.txt @@ -92,7 +92,7 @@ Settings: SYSCLK=80, optimal wait states, prefetching enabled --- Result: SUCCESS ---------------------------------------------------------------------------- --- Test Case 11.1 (Benchmark, messages #1) ---- Score : 280180 msgs/S, 560360 ctxswc/S +--- Score : 280181 msgs/S, 560362 ctxswc/S --- Result: SUCCESS ---------------------------------------------------------------------------- --- Test Case 11.2 (Benchmark, messages #2) @@ -116,7 +116,7 @@ Settings: SYSCLK=80, optimal wait states, prefetching enabled --- Result: SUCCESS ---------------------------------------------------------------------------- --- Test Case 11.7 (Benchmark, mass reschedulation, 5 threads) ---- Score : 73863 reschedulations/S, 443178 ctxswc/S +--- Score : 74206 reschedulations/S, 445236 ctxswc/S --- Result: SUCCESS ---------------------------------------------------------------------------- --- Test Case 11.8 (Benchmark, round robin context switching) @@ -128,11 +128,11 @@ Settings: SYSCLK=80, optimal wait states, prefetching enabled --- Result: SUCCESS ---------------------------------------------------------------------------- --- Test Case 11.10 (Benchmark, virtual timers set/reset) ---- Score : 1093666 timers/S +--- Score : 1093662 timers/S --- Result: SUCCESS ---------------------------------------------------------------------------- --- Test Case 11.11 (Benchmark, semaphores wait/signal) ---- Score : 1027008 wait+signal/S +--- Score : 1027012 wait+signal/S --- Result: SUCCESS ---------------------------------------------------------------------------- --- Test Case 11.12 (Benchmark, mutexes lock/unlock) 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); } /**