From 0a7a3d4b4afa0322c1753a016ed51166f87911e3 Mon Sep 17 00:00:00 2001 From: richardbarry Date: Sat, 12 Apr 2008 23:25:17 +0000 Subject: [PATCH] Update the sys tick to be more efficient. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@304 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- Source/portable/GCC/ARM_CM3/port.c | 4 ++-- Source/portable/IAR/ARM_CM3/port.c | 4 ++-- Source/portable/RVDS/ARM_CM3/port.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Source/portable/GCC/ARM_CM3/port.c b/Source/portable/GCC/ARM_CM3/port.c index 2ae103319..8aa6fb227 100644 --- a/Source/portable/GCC/ARM_CM3/port.c +++ b/Source/portable/GCC/ARM_CM3/port.c @@ -262,12 +262,12 @@ void xPortPendSVHandler( void ) void xPortSysTickHandler( void ) { - vTaskIncrementTick(); - /* If using preemption, also force a context switch. */ #if configUSE_PREEMPTION == 1 *(portNVIC_INT_CTRL) |= portNVIC_PENDSVSET; #endif + + vTaskIncrementTick(); } /*-----------------------------------------------------------*/ diff --git a/Source/portable/IAR/ARM_CM3/port.c b/Source/portable/IAR/ARM_CM3/port.c index be91fdfb3..2f91cb25f 100644 --- a/Source/portable/IAR/ARM_CM3/port.c +++ b/Source/portable/IAR/ARM_CM3/port.c @@ -184,12 +184,12 @@ void vPortExitCritical( void ) void xPortSysTickHandler( void ) { - vTaskIncrementTick(); - /* If using preemption, also force a context switch. */ #if configUSE_PREEMPTION == 1 *(portNVIC_INT_CTRL) |= portNVIC_PENDSVSET; #endif + + vTaskIncrementTick(); } /*-----------------------------------------------------------*/ diff --git a/Source/portable/RVDS/ARM_CM3/port.c b/Source/portable/RVDS/ARM_CM3/port.c index 091addde9..a8efbe82e 100644 --- a/Source/portable/RVDS/ARM_CM3/port.c +++ b/Source/portable/RVDS/ARM_CM3/port.c @@ -243,12 +243,12 @@ sv_disable_interrupts void xPortSysTickHandler( void ) { - vTaskIncrementTick(); - /* If using preemption, also force a context switch. */ #if configUSE_PREEMPTION == 1 *(portNVIC_INT_CTRL) |= portNVIC_PENDSVSET; #endif + + vTaskIncrementTick(); } /*-----------------------------------------------------------*/ -- 2.39.5