From aaad958769e757093a258cfdd5c75f515534fd7a Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 13 Aug 2011 07:06:02 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3224 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/ports/GCC/ARMCMx/chcore.h | 2 +- os/ports/GCC/ARMCMx/chcore_v6m.c | 8 ++------ os/ports/GCC/ARMCMx/chcore_v7m.c | 6 ++---- 3 files changed, 5 insertions(+), 11 deletions(-) (limited to 'os/ports/GCC/ARMCMx') diff --git a/os/ports/GCC/ARMCMx/chcore.h b/os/ports/GCC/ARMCMx/chcore.h index 5d47a6699..944094925 100644 --- a/os/ports/GCC/ARMCMx/chcore.h +++ b/os/ports/GCC/ARMCMx/chcore.h @@ -116,7 +116,7 @@ * separate interrupt stack and the stack space between @p intctx and * @p extctx is known to be zero. * @note In this port it is conservatively set to 16 because the function - * @p chSchDoRescheduleI() can have a stack frame, expecially with + * @p chSchDoReschedule() can have a stack frame, expecially with * compiler optimizations disabled. */ #ifndef PORT_INT_REQUIRED_STACK diff --git a/os/ports/GCC/ARMCMx/chcore_v6m.c b/os/ports/GCC/ARMCMx/chcore_v6m.c index 4ee3dca1a..453bc2c65 100644 --- a/os/ports/GCC/ARMCMx/chcore_v6m.c +++ b/os/ports/GCC/ARMCMx/chcore_v6m.c @@ -90,12 +90,8 @@ __attribute__((naked)) #endif void _port_switch_from_isr(void) { - /* The calls to the debug functions are required in order to simulate the - correct call protocol from this peculiar code zone.*/ - dbg_check_lock(); - if (chSchIsRescRequiredExI()) - chSchDoRescheduleI(); - dbg_check_unlock(); + if (chSchIsPreemptionRequired()) + chSchDoReschedule(); #if CORTEX_ALTERNATE_SWITCH SCB_ICSR = ICSR_PENDSVSET; port_unlock(); diff --git a/os/ports/GCC/ARMCMx/chcore_v7m.c b/os/ports/GCC/ARMCMx/chcore_v7m.c index 5f9be6f4d..e8a1ff16e 100644 --- a/os/ports/GCC/ARMCMx/chcore_v7m.c +++ b/os/ports/GCC/ARMCMx/chcore_v7m.c @@ -141,11 +141,9 @@ __attribute__((naked)) #endif void _port_switch_from_isr(void) { - /* The calls to the debug functions are required in order to simulate the - correct call protocol from this peculiar code zone.*/ dbg_check_lock(); - if (chSchIsRescRequiredExI()) - chSchDoRescheduleI(); + if (chSchIsPreemptionRequired()) + chSchDoReschedule(); dbg_check_unlock(); #if !CORTEX_SIMPLIFIED_PRIORITY || defined(__DOXYGEN__) asm volatile ("svc #0"); -- cgit v1.2.3