From 19bc8bd773d40d081e7fba43fb71dcb2070c18f6 Mon Sep 17 00:00:00 2001 From: richardbarry Date: Fri, 7 Jun 2013 12:39:56 +0000 Subject: [PATCH] Update ports that have their tick configuration in an application callback to use xTaskIncrementTick() in place of vTaskIncrementTick(). git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1923 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- .../sources/FreeRTOS_Tick_Setup.c | 13 ++++--------- .../RTOSDemo/FreeRTOS_Tick_Setup.c | 13 ++++--------- .../FreeRTOS_Tick_Setup.c | 13 ++++--------- .../RTOSDemo/FreeRTOS_Tick_Setup.c | 13 ++++--------- FreeRTOS/Source/portable/GCC/RX600/port.c | 2 +- 5 files changed, 17 insertions(+), 37 deletions(-) diff --git a/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/FreeRTOS_Tick_Setup.c b/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/FreeRTOS_Tick_Setup.c index 335710581..d2d2769fe 100644 --- a/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/FreeRTOS_Tick_Setup.c +++ b/FreeRTOS/Demo/ColdFire_MCF52221_CodeWarrior/sources/FreeRTOS_Tick_Setup.c @@ -148,14 +148,9 @@ unsigned portLONG ulSavedInterruptMask; /* Increment the RTOS tick. */ ulSavedInterruptMask = portSET_INTERRUPT_MASK_FROM_ISR(); - vTaskIncrementTick(); + if( xTaskIncrementTick() != pdFALSE ) + { + taskYIELD(); + } portCLEAR_INTERRUPT_MASK_FROM_ISR( ulSavedInterruptMask ); - - /* If we are using the pre-emptive scheduler then also request a - context switch as incrementing the tick could have unblocked a task. */ - #if configUSE_PREEMPTION == 1 - { - taskYIELD(); - } - #endif } diff --git a/FreeRTOS/Demo/ColdFire_MCF52233_Eclipse/RTOSDemo/FreeRTOS_Tick_Setup.c b/FreeRTOS/Demo/ColdFire_MCF52233_Eclipse/RTOSDemo/FreeRTOS_Tick_Setup.c index 4c84befe4..53087b765 100644 --- a/FreeRTOS/Demo/ColdFire_MCF52233_Eclipse/RTOSDemo/FreeRTOS_Tick_Setup.c +++ b/FreeRTOS/Demo/ColdFire_MCF52233_Eclipse/RTOSDemo/FreeRTOS_Tick_Setup.c @@ -147,14 +147,9 @@ unsigned portLONG ulSavedInterruptMask; /* Increment the RTOS tick. */ ulSavedInterruptMask = portSET_INTERRUPT_MASK_FROM_ISR(); - vTaskIncrementTick(); + if( xTaskIncrementTick() != pdFALSE ) + { + taskYIELD(); + } portCLEAR_INTERRUPT_MASK_FROM_ISR( ulSavedInterruptMask ); - - /* If we are using the pre-emptive scheduler then also request a - context switch as incrementing the tick could have unblocked a task. */ - #if configUSE_PREEMPTION == 1 - { - taskYIELD(); - } - #endif } diff --git a/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/FreeRTOS_Tick_Setup.c b/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/FreeRTOS_Tick_Setup.c index 6727b05ea..3b595a9b6 100644 --- a/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/FreeRTOS_Tick_Setup.c +++ b/FreeRTOS/Demo/ColdFire_MCF52259_CodeWarrior/FreeRTOS_Tick_Setup.c @@ -148,14 +148,9 @@ unsigned portLONG ulSavedInterruptMask; /* Increment the RTOS tick. */ ulSavedInterruptMask = portSET_INTERRUPT_MASK_FROM_ISR(); - vTaskIncrementTick(); + if( xTaskIncrementTick() != pdFALSE ) + { + taskYIELD(); + } portCLEAR_INTERRUPT_MASK_FROM_ISR( ulSavedInterruptMask ); - - /* If we are using the pre-emptive scheduler then also request a - context switch as incrementing the tick could have unblocked a task. */ - #if configUSE_PREEMPTION == 1 - { - taskYIELD(); - } - #endif } diff --git a/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/FreeRTOS_Tick_Setup.c b/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/FreeRTOS_Tick_Setup.c index 4c84befe4..53087b765 100644 --- a/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/FreeRTOS_Tick_Setup.c +++ b/FreeRTOS/Demo/ColdFire_MCF5282_Eclipse/RTOSDemo/FreeRTOS_Tick_Setup.c @@ -147,14 +147,9 @@ unsigned portLONG ulSavedInterruptMask; /* Increment the RTOS tick. */ ulSavedInterruptMask = portSET_INTERRUPT_MASK_FROM_ISR(); - vTaskIncrementTick(); + if( xTaskIncrementTick() != pdFALSE ) + { + taskYIELD(); + } portCLEAR_INTERRUPT_MASK_FROM_ISR( ulSavedInterruptMask ); - - /* If we are using the pre-emptive scheduler then also request a - context switch as incrementing the tick could have unblocked a task. */ - #if configUSE_PREEMPTION == 1 - { - taskYIELD(); - } - #endif } diff --git a/FreeRTOS/Source/portable/GCC/RX600/port.c b/FreeRTOS/Source/portable/GCC/RX600/port.c index 29731368b..dc41b616c 100644 --- a/FreeRTOS/Source/portable/GCC/RX600/port.c +++ b/FreeRTOS/Source/portable/GCC/RX600/port.c @@ -364,7 +364,7 @@ void vTickISR( void ) necessitates. Ensure IPL is at the max syscall value first. */ portDISABLE_INTERRUPTS_FROM_KERNEL_ISR(); { - if( TaskIncrementTick() != pdFALSE ) + if( xTaskIncrementTick() != pdFALSE ) { taskYIELD(); } -- 2.39.5