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

master
gdisirio 2009-09-13 12:06:08 +00:00
parent c5496788e5
commit d688b84d25
9 changed files with 26 additions and 25 deletions

View File

@ -145,4 +145,4 @@ ULIBS =
# End of user defines
##############################################################################
include ../../ports/MSP430/rules.mk
include ../../os/ports/GCC/MSP430/rules.mk

View File

@ -90,51 +90,51 @@ Settings: SYSCLK=72, ACR=0x12 (2 wait states)
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.1 (Benchmark, messages #1)
--- Score : 221722 msgs/S, 443444 ctxswc/S
--- Score : 221751 msgs/S, 443502 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.2 (Benchmark, messages #2)
--- Score : 185630 msgs/S, 371260 ctxswc/S
--- Score : 185654 msgs/S, 371308 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.3 (Benchmark, messages #3)
--- Score : 185630 msgs/S, 371260 ctxswc/S
--- Score : 185654 msgs/S, 371308 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.4 (Benchmark, context switch)
--- Score : 696632 ctxswc/S
--- Score : 696720 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.5 (Benchmark, threads, full cycle)
--- Score : 173525 threads/S
--- Score : 173548 threads/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.6 (Benchmark, threads, create only)
--- Score : 222415 threads/S
--- Score : 222442 threads/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.7 (Benchmark, mass reschedulation, 5 threads)
--- Score : 56929 reschedulations/S, 341574 ctxswc/S
--- Score : 56936 reschedulations/S, 341616 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.8 (Benchmark, round robin context switching)
--- Score : 505056 reschedulations/S, 505056 ctxswc/S
--- Score : 505120 reschedulations/S, 505120 ctxswc/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.9 (Benchmark, I/O Queues throughput)
--- Score : 474812 bytes/S
--- Score : 474880 bytes/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.10 (Benchmark, virtual timers set/reset)
--- Score : 647250 timers/S
--- Score : 647326 timers/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.11 (Benchmark, semaphores wait/signal)
--- Score : 833064 wait+signal/S
--- Score : 833164 wait+signal/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.12 (Benchmark, mutexes lock/unlock)
--- Score : 586532 lock+unlock/S
--- Score : 586596 lock+unlock/S
--- Result: SUCCESS
----------------------------------------------------------------------------
--- Test Case 11.13 (Benchmark, RAM footprint)

View File

@ -97,7 +97,7 @@ extern "C" {
void chSchWakeupS(Thread *tp, msg_t msg);
void chSchDoRescheduleI(void);
void chSchRescheduleS(void);
bool_t chSchRescRequiredI(void);
bool_t chSchIsRescRequiredExI(void);
#if CH_USE_ROUNDROBIN
void chSchDoYieldS(void);
#endif
@ -117,7 +117,7 @@ extern "C" {
* @details This function returns @p TRUE if there is a ready thread with
* higher priority.
*/
#define chSchMustRescheduleS() (firstprio(&rlist.r_queue) > currp->p_prio)
#define chSchIsRescRequiredI() (firstprio(&rlist.r_queue) > currp->p_prio)
#endif /* _SCHEDULER_H_ */

View File

@ -211,7 +211,7 @@ void chSchDoRescheduleI(void) {
*/
void chSchRescheduleS(void) {
if (chSchMustRescheduleS())
if (chSchIsRescRequiredI())
chSchDoRescheduleI();
}
@ -222,8 +222,11 @@ void chSchRescheduleS(void) {
*
* @retval TRUE if there is a thread that should go in running state.
* @retval FALSE if a reschedulation is not required.
*
* @note This function is meant to be used in the timer interrupt handler
* where @p chVTDoTickI() is invoked.
*/
bool_t chSchRescRequiredI(void) {
bool_t chSchIsRescRequiredExI(void) {
tprio_t p1 = firstprio(&rlist.r_queue);
tprio_t p2 = currp->p_prio;
#if CH_USE_ROUNDROBIN

View File

@ -166,7 +166,7 @@ _port_irq_common:
.code 32
.globl _port_irq_common
_port_irq_common:
bl chSchRescRequiredI
bl chSchIsRescRequiredExI
#endif /* !THUMB_NO_INTERWORKING */
cmp r0, #0 // Simply returns if a
ldmeqfd sp!, {r0-r3, r12, lr} // reschedule is not

View File

@ -61,13 +61,11 @@ void _port_unlock(void) {
*/
CH_IRQ_HANDLER(SysTickVector) {
CH_IRQ_PROLOGUE();
chSysLockFromIsr();
chSysTimerHandlerI();
if (chSchIsRescRequiredExI())
SCB_ICSR = ICSR_PENDSVSET;
chSysUnlockFromIsr();
CH_IRQ_EPILOGUE();
}
/**

View File

@ -211,7 +211,7 @@ struct context {
*/
#define PORT_IRQ_EPILOGUE() { \
chSysLockFromIsr(); \
if (chSchRescRequiredI()) \
if (chSchIsRescRequiredI()) \
SCB_ICSR = ICSR_PENDSVSET; \
chSysUnlockFromIsr(); \
}

View File

@ -190,7 +190,7 @@ struct context {
* invoke system APIs.
*/
#define PORT_IRQ_EPILOGUE() { \
if (chSchRescRequiredI()) \
if (chSchIsRescRequiredExI()) \
chSchDoRescheduleI(); \
}

View File

@ -157,7 +157,7 @@ struct context {
* invoke system APIs.
*/
#define PORT_IRQ_EPILOGUE() { \
if (chSchRescRequiredI()) \
if (chSchIsRescRequiredExI()) \
chSchDoRescheduleI(); \
}