From: richardbarry Date: Sat, 12 Apr 2008 23:25:17 +0000 (+0000) Subject: Update the sys tick to be more efficient. X-Git-Tag: V5.0.0~20 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0a7a3d4b4afa0322c1753a016ed51166f87911e3;p=freertos 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 --- 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(); } /*-----------------------------------------------------------*/