mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-19 17:48:33 -04:00
Fix MISRA_C_2012 rule 8.4 violation (#844)
Fix MISRA_C_2012 rule 8.4 violation
This commit is contained in:
parent
22eb827b3d
commit
d1a0202125
3 changed files with 16 additions and 8 deletions
5
tasks.c
5
tasks.c
|
@ -436,6 +436,9 @@ typedef tskTCB TCB_t;
|
|||
/*lint -save -e956 A manual analysis and inspection has been used to determine
|
||||
* which static variables must be declared volatile. */
|
||||
#if ( configNUMBER_OF_CORES == 1 )
|
||||
/* MISRA Ref 8.4.1 [Declaration shall be visible] */
|
||||
/* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#rule-84 */
|
||||
/* coverity[misra_c_2012_rule_8_4_violation] */
|
||||
portDONT_DISCARD PRIVILEGED_DATA TCB_t * volatile pxCurrentTCB = NULL;
|
||||
#else
|
||||
/* MISRA Ref 8.4.1 [Declaration shall be visible] */
|
||||
|
@ -490,7 +493,7 @@ PRIVILEGED_DATA static TaskHandle_t xIdleTaskHandles[ configNUMBER_OF_CORES ];
|
|||
/* Improve support for OpenOCD. The kernel tracks Ready tasks via priority lists.
|
||||
* For tracking the state of remote threads, OpenOCD uses uxTopUsedPriority
|
||||
* to determine the number of priority lists to read back from the remote target. */
|
||||
const volatile UBaseType_t uxTopUsedPriority = configMAX_PRIORITIES - 1U;
|
||||
static const volatile UBaseType_t uxTopUsedPriority = configMAX_PRIORITIES - 1U;
|
||||
|
||||
/* Context switches are held pending while the scheduler is suspended. Also,
|
||||
* interrupts must not manipulate the xStateListItem of a TCB, or any of the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue