From 222a32e0681110996dcef4aafdfc87cd9bab3b54 Mon Sep 17 00:00:00 2001 From: rtel Date: Mon, 27 Aug 2018 21:59:26 +0000 Subject: [PATCH] Move some variables from function scope back to being file scope for the benefit of some kernel aware debuggers that were left working in a non-functioning mode after the V10.1.0 release - not last change for this purpose. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2567 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- .../Demo/CORTEX_STM32F103_GCC_Rowley/main.c | 24 +++++++++---------- FreeRTOS/Source/tasks.c | 4 ++-- FreeRTOS/Source/timers.c | 5 ++-- 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/main.c b/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/main.c index cd06a2766..7d269cae3 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/main.c +++ b/FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/main.c @@ -191,18 +191,18 @@ unsigned long ulTicksToWait = mainCHECK_DELAY_NO_ERROR; { ulTicksToWait = mainCHECK_DELAY_ERROR; } - else if( xAreSemaphoreTasksStillRunning() != pdTRUE ) - { - ulTicksToWait = mainCHECK_DELAY_ERROR; - } - else if( xAreIntegerMathsTaskStillRunning() != pdTRUE ) - { - ulTicksToWait = mainCHECK_DELAY_ERROR; - } - else if( xAreRecursiveMutexTasksStillRunning() != pdTRUE ) - { - ulTicksToWait = mainCHECK_DELAY_ERROR; - } + else if( xAreSemaphoreTasksStillRunning() != pdTRUE ) + { + ulTicksToWait = mainCHECK_DELAY_ERROR; + } + else if( xAreIntegerMathsTaskStillRunning() != pdTRUE ) + { + ulTicksToWait = mainCHECK_DELAY_ERROR; + } + else if( xAreRecursiveMutexTasksStillRunning() != pdTRUE ) + { + ulTicksToWait = mainCHECK_DELAY_ERROR; + } vParTestToggleLED( mainCHECK_LED ); } diff --git a/FreeRTOS/Source/tasks.c b/FreeRTOS/Source/tasks.c index d9d2b5824..5d47418c0 100644 --- a/FreeRTOS/Source/tasks.c +++ b/FreeRTOS/Source/tasks.c @@ -352,6 +352,8 @@ PRIVILEGED_DATA TCB_t * volatile pxCurrentTCB = NULL; /* Lists for ready and blocked tasks. --------------------*/ PRIVILEGED_DATA static List_t pxReadyTasksLists[ configMAX_PRIORITIES ];/*< Prioritised ready tasks. */ +PRIVILEGED_DATA static List_t xDelayedTaskList1; /*< Delayed tasks. */ +PRIVILEGED_DATA static List_t xDelayedTaskList2; /*< Delayed tasks (two lists are used - one for delays that have overflowed the current tick count. */ PRIVILEGED_DATA static List_t * volatile pxDelayedTaskList; /*< Points to the delayed task list currently being used. */ PRIVILEGED_DATA static List_t * volatile pxOverflowDelayedTaskList; /*< Points to the delayed task list currently being used to hold tasks that have overflowed the current tick count. */ PRIVILEGED_DATA static List_t xPendingReadyList; /*< Tasks that have been readied while the scheduler was suspended. They will be moved to the ready list when the scheduler is resumed. */ @@ -3488,8 +3490,6 @@ static portTASK_FUNCTION( prvIdleTask, pvParameters ) static void prvInitialiseTaskLists( void ) { UBaseType_t uxPriority; -PRIVILEGED_DATA static List_t xDelayedTaskList1; /*< Delayed tasks. */ -PRIVILEGED_DATA static List_t xDelayedTaskList2; /*< Delayed tasks (two lists are used - one for delays that have overflowed the current tick count. */ for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ ) { diff --git a/FreeRTOS/Source/timers.c b/FreeRTOS/Source/timers.c index ac3db3f03..1c95d865e 100644 --- a/FreeRTOS/Source/timers.c +++ b/FreeRTOS/Source/timers.c @@ -128,6 +128,8 @@ which static variables must be declared volatile. */ /* The list in which active timers are stored. Timers are referenced in expire time order, with the nearest expiry time at the front of the list. Only the timer service task is allowed to access these lists. */ +PRIVILEGED_DATA static List_t xActiveTimerList1; +PRIVILEGED_DATA static List_t xActiveTimerList2; PRIVILEGED_DATA static List_t *pxCurrentTimerList; PRIVILEGED_DATA static List_t *pxOverflowTimerList; @@ -892,9 +894,6 @@ BaseType_t xResult; static void prvCheckForValidListAndQueue( void ) { -PRIVILEGED_DATA static List_t xActiveTimerList1; -PRIVILEGED_DATA static List_t xActiveTimerList2; - /* Check that the list from which active timers are referenced, and the queue used to communicate with the timer service, have been initialised. */ -- 2.39.5