You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix MISRA C 2012 Rule 20.4: Replace #define static with STATIC macro
Replace `#define static` with `#define STATIC static` to prevent the macro
from shadowing the C `static` keyword. This also ensures static variables
in `vApplicationGetIdleTaskMemory()` and `vApplicationGetPassiveIdleTaskMemory()`
remain static even when portREMOVE_STATIC_QUALIFIER is defined, preventing
use-after-free bugs from stack-allocated storage.
staticList_txDelayedCoRoutineList2; /**< Delayed co-routines (two lists are used - one for delays that have overflowed the current tick count. */
49
-
staticList_t*pxDelayedCoRoutineList=NULL; /**< Points to the delayed co-routine list currently being used. */
50
-
staticList_t*pxOverflowDelayedCoRoutineList=NULL; /**< Points to the delayed co-routine list currently being used to hold co-routines that have overflowed the current tick count. */
51
-
staticList_txPendingReadyCoRoutineList; /**< Holds co-routines that have been readied by an external event. They cannot be added directly to the ready lists as the ready lists cannot be accessed by interrupts. */
STATICList_txDelayedCoRoutineList2; /**< Delayed co-routines (two lists are used - one for delays that have overflowed the current tick count. */
51
+
STATICList_t*pxDelayedCoRoutineList=NULL; /**< Points to the delayed co-routine list currently being used. */
52
+
STATICList_t*pxOverflowDelayedCoRoutineList=NULL; /**< Points to the delayed co-routine list currently being used to hold co-routines that have overflowed the current tick count. */
53
+
STATICList_txPendingReadyCoRoutineList; /**< Holds co-routines that have been readied by an external event. They cannot be added directly to the ready lists as the ready lists cannot be accessed by interrupts. */
52
54
53
55
/* Other file private variables. --------------------------------*/
PRIVILEGED_DATAstaticList_txDelayedTaskList2; /**< Delayed tasks (two lists are used - one for delays that have overflowed the current tick count. */
479
-
PRIVILEGED_DATAstaticList_t*volatilepxDelayedTaskList; /**< Points to the delayed task list currently being used. */
480
-
PRIVILEGED_DATAstaticList_t*volatilepxOverflowDelayedTaskList; /**< Points to the delayed task list currently being used to hold tasks that have overflowed the current tick count. */
481
-
PRIVILEGED_DATAstaticList_txPendingReadyList; /**< Tasks that have been readied while the scheduler was suspended. They will be moved to the ready list when the scheduler is resumed. */
PRIVILEGED_DATASTATICList_txDelayedTaskList2; /**< Delayed tasks (two lists are used - one for delays that have overflowed the current tick count. */
481
+
PRIVILEGED_DATASTATICList_t*volatilepxDelayedTaskList; /**< Points to the delayed task list currently being used. */
482
+
PRIVILEGED_DATASTATICList_t*volatilepxOverflowDelayedTaskList; /**< Points to the delayed task list currently being used to hold tasks that have overflowed the current tick count. */
483
+
PRIVILEGED_DATASTATICList_txPendingReadyList; /**< Tasks that have been readied while the scheduler was suspended. They will be moved to the ready list when the scheduler is resumed. */
482
484
483
485
#if ( INCLUDE_vTaskDelete==1 )
484
486
485
-
PRIVILEGED_DATAstaticList_txTasksWaitingTermination; /**< Tasks that have been deleted - but their memory not yet freed. */
PRIVILEGED_DATAstaticvolatileTickType_txNextTaskUnblockTime= ( TickType_t ) 0U; /* Initialised to portMAX_DELAY before the scheduler starts. */
512
-
PRIVILEGED_DATAstaticTaskHandle_txIdleTaskHandles[ configNUMBER_OF_CORES ]; /**< Holds the handles of the idle tasks. The idle tasks are created automatically when the scheduler is started. */
PRIVILEGED_DATASTATICvolatileTickType_txNextTaskUnblockTime= ( TickType_t ) 0U; /* Initialised to portMAX_DELAY before the scheduler starts. */
514
+
PRIVILEGED_DATASTATICTaskHandle_txIdleTaskHandles[ configNUMBER_OF_CORES ]; /**< Holds the handles of the idle tasks. The idle tasks are created automatically when the scheduler is started. */
513
515
514
516
/* Improve support for OpenOCD. The kernel tracks Ready tasks via priority lists.
515
517
* For tracking the state of remote threads, OpenOCD uses uxTopUsedPriority
516
518
* to determine the number of priority lists to read back from the remote target. */
/* Do not move these variables to function scope as doing so prevents the
536
538
* code working with debuggers that need to remove the static qualifier. */
537
-
PRIVILEGED_DATAstaticconfigRUN_TIME_COUNTER_TYPEulTaskSwitchedInTime[ configNUMBER_OF_CORES ] = { 0U }; /**< Holds the value of a timer/counter the last time a task was switched in. */
538
-
PRIVILEGED_DATAstaticvolatileconfigRUN_TIME_COUNTER_TYPEulTotalRunTime[ configNUMBER_OF_CORES ] = { 0U }; /**< Holds the total amount of execution time as defined by the run time counter clock. */
539
+
PRIVILEGED_DATASTATICconfigRUN_TIME_COUNTER_TYPEulTaskSwitchedInTime[ configNUMBER_OF_CORES ] = { 0U }; /**< Holds the value of a timer/counter the last time a task was switched in. */
540
+
PRIVILEGED_DATASTATICvolatileconfigRUN_TIME_COUNTER_TYPEulTotalRunTime[ configNUMBER_OF_CORES ] = { 0U }; /**< Holds the total amount of execution time as defined by the run time counter clock. */
0 commit comments