]> git.sur5r.net Git - freertos/commitdiff
Move some variables from function scope back to being file scope for the benefit...
authorrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Mon, 27 Aug 2018 21:59:26 +0000 (21:59 +0000)
committerrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Mon, 27 Aug 2018 21:59:26 +0000 (21:59 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2567 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

FreeRTOS/Demo/CORTEX_STM32F103_GCC_Rowley/main.c
FreeRTOS/Source/tasks.c
FreeRTOS/Source/timers.c

index cd06a276675aa90c1d81039890ec358406f757ae..7d269cae3bb5b34e466a4de5e69a24422d358519 100644 (file)
@@ -191,18 +191,18 @@ unsigned long ulTicksToWait = mainCHECK_DELAY_NO_ERROR;
                {\r
                        ulTicksToWait = mainCHECK_DELAY_ERROR;\r
                }\r
-           else if( xAreSemaphoreTasksStillRunning() != pdTRUE )\r
-           {\r
-               ulTicksToWait = mainCHECK_DELAY_ERROR;\r
-           }\r
-           else if( xAreIntegerMathsTaskStillRunning() != pdTRUE )\r
-           {\r
-               ulTicksToWait = mainCHECK_DELAY_ERROR;\r
-           }\r
-           else if( xAreRecursiveMutexTasksStillRunning() != pdTRUE )\r
-           {\r
-               ulTicksToWait = mainCHECK_DELAY_ERROR;\r
-           }\r
+               else if( xAreSemaphoreTasksStillRunning() != pdTRUE )\r
+               {\r
+                       ulTicksToWait = mainCHECK_DELAY_ERROR;\r
+               }\r
+               else if( xAreIntegerMathsTaskStillRunning() != pdTRUE )\r
+               {\r
+                       ulTicksToWait = mainCHECK_DELAY_ERROR;\r
+               }\r
+               else if( xAreRecursiveMutexTasksStillRunning() != pdTRUE )\r
+               {\r
+                       ulTicksToWait = mainCHECK_DELAY_ERROR;\r
+               }\r
 \r
                vParTestToggleLED( mainCHECK_LED );\r
        }\r
index d9d2b5824af320cb3f115849df5b26f907161264..5d47418c0580b1439f5fda6ebc56adef668461b7 100644 (file)
@@ -352,6 +352,8 @@ PRIVILEGED_DATA TCB_t * volatile pxCurrentTCB = NULL;
 \r
 /* Lists for ready and blocked tasks. --------------------*/\r
 PRIVILEGED_DATA static List_t pxReadyTasksLists[ configMAX_PRIORITIES ];/*< Prioritised ready tasks. */\r
+PRIVILEGED_DATA static List_t xDelayedTaskList1;                                               /*< Delayed tasks. */\r
+PRIVILEGED_DATA static List_t xDelayedTaskList2;                                               /*< Delayed tasks (two lists are used - one for delays that have overflowed the current tick count. */\r
 PRIVILEGED_DATA static List_t * volatile pxDelayedTaskList;                            /*< Points to the delayed task list currently being used. */\r
 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. */\r
 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. */\r
@@ -3488,8 +3490,6 @@ static portTASK_FUNCTION( prvIdleTask, pvParameters )
 static void prvInitialiseTaskLists( void )\r
 {\r
 UBaseType_t uxPriority;\r
-PRIVILEGED_DATA static List_t xDelayedTaskList1;       /*< Delayed tasks. */\r
-PRIVILEGED_DATA static List_t xDelayedTaskList2;       /*< Delayed tasks (two lists are used - one for delays that have overflowed the current tick count. */\r
 \r
        for( uxPriority = ( UBaseType_t ) 0U; uxPriority < ( UBaseType_t ) configMAX_PRIORITIES; uxPriority++ )\r
        {\r
index ac3db3f03a458a25a3e83f7b11142144530ef383..1c95d865e668125c9c6120d25c03bb105caf8670 100644 (file)
@@ -128,6 +128,8 @@ which static variables must be declared volatile. */
 /* The list in which active timers are stored.  Timers are referenced in expire\r
 time order, with the nearest expiry time at the front of the list.  Only the\r
 timer service task is allowed to access these lists. */\r
+PRIVILEGED_DATA static List_t xActiveTimerList1;\r
+PRIVILEGED_DATA static List_t xActiveTimerList2;\r
 PRIVILEGED_DATA static List_t *pxCurrentTimerList;\r
 PRIVILEGED_DATA static List_t *pxOverflowTimerList;\r
 \r
@@ -892,9 +894,6 @@ BaseType_t xResult;
 \r
 static void prvCheckForValidListAndQueue( void )\r
 {\r
-PRIVILEGED_DATA static List_t xActiveTimerList1;\r
-PRIVILEGED_DATA static List_t xActiveTimerList2;\r
-\r
        /* Check that the list from which active timers are referenced, and the\r
        queue used to communicate with the timer service, have been\r
        initialised. */\r