git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1756 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2010-03-19 15:45:25 +00:00
parent 79075f9e81
commit b61fb43e6c
6 changed files with 19 additions and 23 deletions

View File

@ -92,35 +92,35 @@ Settings: SYSCLK=80, optimal wait states, prefetching enabled
--- Result: SUCCESS --- Result: SUCCESS
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
--- Test Case 11.1 (Benchmark, messages #1) --- Test Case 11.1 (Benchmark, messages #1)
--- Score : 280181 msgs/S, 560362 ctxswc/S --- Score : 278228 msgs/S, 556456 ctxswc/S
--- Result: SUCCESS --- Result: SUCCESS
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
--- Test Case 11.2 (Benchmark, messages #2) --- Test Case 11.2 (Benchmark, messages #2)
--- Score : 227495 msgs/S, 454990 ctxswc/S --- Score : 226208 msgs/S, 452416 ctxswc/S
--- Result: SUCCESS --- Result: SUCCESS
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
--- Test Case 11.3 (Benchmark, messages #3) --- Test Case 11.3 (Benchmark, messages #3)
--- Score : 227495 msgs/S, 454990 ctxswc/S --- Score : 226208 msgs/S, 452416 ctxswc/S
--- Result: SUCCESS --- Result: SUCCESS
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
--- Test Case 11.4 (Benchmark, context switch) --- Test Case 11.4 (Benchmark, context switch)
--- Score : 898496 ctxswc/S --- Score : 895976 ctxswc/S
--- Result: SUCCESS --- Result: SUCCESS
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
--- Test Case 11.5 (Benchmark, threads, full cycle) --- Test Case 11.5 (Benchmark, threads, full cycle)
--- Score : 183569 threads/S --- Score : 182729 threads/S
--- Result: SUCCESS --- Result: SUCCESS
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
--- Test Case 11.6 (Benchmark, threads, create only) --- Test Case 11.6 (Benchmark, threads, create only)
--- Score : 262670 threads/S --- Score : 260954 threads/S
--- Result: SUCCESS --- Result: SUCCESS
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
--- Test Case 11.7 (Benchmark, mass reschedulation, 5 threads) --- Test Case 11.7 (Benchmark, mass reschedule, 5 threads)
--- Score : 74206 reschedulations/S, 445236 ctxswc/S --- Score : 74067 reschedules/S, 444402 ctxswc/S
--- Result: SUCCESS --- Result: SUCCESS
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
--- Test Case 11.8 (Benchmark, round robin context switching) --- Test Case 11.8 (Benchmark, round robin context switching)
--- Score : 614140 reschedulations/S, 614140 ctxswc/S --- Score : 614136 ctxswc/S
--- Result: SUCCESS --- Result: SUCCESS
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
--- Test Case 11.9 (Benchmark, I/O Queues throughput) --- Test Case 11.9 (Benchmark, I/O Queues throughput)
@ -128,7 +128,7 @@ Settings: SYSCLK=80, optimal wait states, prefetching enabled
--- Result: SUCCESS --- Result: SUCCESS
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
--- Test Case 11.10 (Benchmark, virtual timers set/reset) --- Test Case 11.10 (Benchmark, virtual timers set/reset)
--- Score : 1093672 timers/S --- Score : 1093666 timers/S
--- Result: SUCCESS --- Result: SUCCESS
---------------------------------------------------------------------------- ----------------------------------------------------------------------------
--- Test Case 11.11 (Benchmark, semaphores wait/signal) --- Test Case 11.11 (Benchmark, semaphores wait/signal)

View File

@ -49,8 +49,8 @@
*/ */
#define REG_INSERT(tp) { \ #define REG_INSERT(tp) { \
(tp)->p_newer = (Thread *)&rlist; \ (tp)->p_newer = (Thread *)&rlist; \
(tp)->p_older = rlist.p_older; \ (tp)->p_older = rlist.r_older; \
(tp)->p_older->p_newer = rlist.p_older = (tp); \ (tp)->p_older->p_newer = rlist.r_older = (tp); \
} }
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -71,11 +71,11 @@ typedef struct {
ThreadsQueue r_queue; /**< @brief Threads queue. */ ThreadsQueue r_queue; /**< @brief Threads queue. */
tprio_t r_prio; /**< @brief This field must be tprio_t r_prio; /**< @brief This field must be
initialized to zero. */ initialized to zero. */
struct context p_ctx; /**< @brief Not used, present because struct context r_ctx; /**< @brief Not used, present because
offsets. */ offsets. */
#if CH_USE_REGISTRY #if CH_USE_REGISTRY
Thread *p_newer; /**< @brief Newer registry element. */ Thread *r_newer; /**< @brief Newer registry element. */
Thread *p_older; /**< @brief Older registry element. */ Thread *r_older; /**< @brief Older registry element. */
#endif #endif
/* End of the fields shared with the Thread structure.*/ /* End of the fields shared with the Thread structure.*/
#if CH_TIME_QUANTUM > 0 #if CH_TIME_QUANTUM > 0

View File

@ -64,7 +64,7 @@ Thread *chRegFirstThread(void) {
Thread *tp; Thread *tp;
chSysLock(); chSysLock();
tp = rlist.p_newer; tp = rlist.r_newer;
#if CH_USE_DYNAMIC #if CH_USE_DYNAMIC
tp->p_refs++; tp->p_refs++;
#endif #endif

View File

@ -51,7 +51,7 @@ void scheduler_init(void) {
rlist.r_preempt = CH_TIME_QUANTUM; rlist.r_preempt = CH_TIME_QUANTUM;
#endif #endif
#if CH_USE_REGISTRY #if CH_USE_REGISTRY
rlist.p_newer = rlist.p_older = (Thread *)&rlist; rlist.r_newer = rlist.r_older = (Thread *)&rlist;
#endif #endif
} }
@ -96,11 +96,11 @@ void chSchGoSleepS(tstate_t newstate) {
Thread *otp; Thread *otp;
(otp = currp)->p_state = newstate; (otp = currp)->p_state = newstate;
setcurrp(fifo_remove(&rlist.r_queue));
currp->p_state = THD_STATE_CURRENT;
#if CH_TIME_QUANTUM > 0 #if CH_TIME_QUANTUM > 0
rlist.r_preempt = CH_TIME_QUANTUM; rlist.r_preempt = CH_TIME_QUANTUM;
#endif #endif
setcurrp(fifo_remove(&rlist.r_queue));
currp->p_state = THD_STATE_CURRENT;
chDbgTrace(currp, otp); chDbgTrace(currp, otp);
chSysSwitchI(currp, otp); chSysSwitchI(currp, otp);
} }

View File

@ -87,10 +87,6 @@
- CHANGE: The module documentation has been moved from the kernel.dox file - CHANGE: The module documentation has been moved from the kernel.dox file
to the various source code files in order to make it easier to maintain to the various source code files in order to make it easier to maintain
and double as source comments. and double as source comments.
- CHANGE: Removed the support for the CH_CURRP_REGISTER_CACHE optimization
in the configuration files and in the scheduler header. It will be
reintroduced as an architecture-specific optimization using the new
capture mechanism (among other optimizations).
*** 1.5.3 *** *** 1.5.3 ***
- FIX: Removed C99-style variables declarations (bug 2964418)(backported - FIX: Removed C99-style variables declarations (bug 2964418)(backported