]> git.sur5r.net Git - freertos/commitdiff
Ensure statics are handled correctly when portREMOVE_STATIC_QUALIFIER is defined.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Wed, 30 Jul 2008 09:34:03 +0000 (09:34 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Wed, 30 Jul 2008 09:34:03 +0000 (09:34 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@421 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Source/tasks.c

index 71e420134a2b3a67a871f1f351b9184117449e3f..72d66b04e4cd8b860523207eb5cf58962c19637b 100644 (file)
@@ -135,6 +135,10 @@ static volatile unsigned portBASE_TYPE uxSchedulerSuspended                = ( unsigned portBA
 static volatile unsigned portBASE_TYPE uxMissedTicks                   = ( unsigned portBASE_TYPE ) 0;\r
 static volatile portBASE_TYPE xMissedYield                                             = ( portBASE_TYPE ) pdFALSE;\r
 static volatile portBASE_TYPE xNumOfOverflows                                  = ( portBASE_TYPE ) 0;\r
+#if ( configUSE_TRACE_FACILITY == 1 )\r
+       static unsigned portBASE_TYPE uxTaskNumber = 0; /*lint !e956 Static is deliberate - this is guarded before use. */\r
+#endif\r
+\r
 /* Debugging and trace facilities private variables and macros. ------------*/\r
 \r
 /*\r
@@ -161,7 +165,8 @@ static volatile portBASE_TYPE xNumOfOverflows                                       = ( portBASE_TYPE ) 0;
        static signed portCHAR *pcTraceBufferStart;\r
        static signed portCHAR *pcTraceBufferEnd;\r
        static signed portBASE_TYPE xTracing = pdFALSE;\r
-\r
+       static unsigned portBASE_TYPE uxPreviousTask = 255;\r
+       static portCHAR pcStatusString[ 50 ];\r
 #endif\r
 \r
 /*-----------------------------------------------------------*/\r
@@ -178,8 +183,6 @@ static volatile portBASE_TYPE xNumOfOverflows                                       = ( portBASE_TYPE ) 0;
        {                                                                                                                                                                                               \\r
                if( xTracing )                                                                                                                                                          \\r
                {                                                                                                                                                                                       \\r
-                       static unsigned portBASE_TYPE uxPreviousTask = 255;                                                                             \\r
-                                                                                                                                                                                                       \\r
                        if( uxPreviousTask != pxCurrentTCB->uxTCBNumber )                                                                               \\r
                        {                                                                                                                                                                               \\r
                                if( ( pcTraceBuffer + tskSIZE_OF_EACH_TRACE_LINE ) < pcTraceBufferEnd )                         \\r
@@ -423,9 +426,6 @@ signed portBASE_TYPE xTaskCreate( pdTASK_CODE pvTaskCode, const signed portCHAR
 {\r
 signed portBASE_TYPE xReturn;\r
 tskTCB * pxNewTCB;\r
-#if ( configUSE_TRACE_FACILITY == 1 )\r
-       static unsigned portBASE_TYPE uxTaskNumber = 0; /*lint !e956 Static is deliberate - this is guarded before use. */\r
-#endif\r
 \r
        /* Allocate the memory required by the TCB and stack for the new task.\r
        checking that the allocation was successful. */\r
@@ -1877,7 +1877,6 @@ tskTCB *pxNewTCB;
        static void prvListTaskWithinSingleList( const signed portCHAR *pcWriteBuffer, xList *pxList, signed portCHAR cStatus )\r
        {\r
        volatile tskTCB *pxNextTCB, *pxFirstTCB;\r
-       static portCHAR pcStatusString[ 50 ];\r
        unsigned portSHORT usStackRemaining;\r
 \r
                /* Write the details of all the TCB's in pxList into the buffer. */\r