mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-12 09:07:46 -04:00
Make uxTopUsedPriority volatile to avoid optimizer + code comment
This commit is contained in:
parent
42c946a53a
commit
04d3892a16
1 changed files with 5 additions and 1 deletions
6
tasks.c
6
tasks.c
|
@ -378,7 +378,11 @@ PRIVILEGED_DATA static volatile BaseType_t xNumOfOverflows = ( BaseType_t ) 0;
|
||||||
PRIVILEGED_DATA static UBaseType_t uxTaskNumber = ( UBaseType_t ) 0U;
|
PRIVILEGED_DATA static UBaseType_t uxTaskNumber = ( UBaseType_t ) 0U;
|
||||||
PRIVILEGED_DATA static volatile TickType_t xNextTaskUnblockTime = ( TickType_t ) 0U; /* Initialised to portMAX_DELAY before the scheduler starts. */
|
PRIVILEGED_DATA static volatile TickType_t xNextTaskUnblockTime = ( TickType_t ) 0U; /* Initialised to portMAX_DELAY before the scheduler starts. */
|
||||||
PRIVILEGED_DATA static TaskHandle_t xIdleTaskHandle = NULL; /*< Holds the handle of the idle task. The idle task is created automatically when the scheduler is started. */
|
PRIVILEGED_DATA static TaskHandle_t xIdleTaskHandle = NULL; /*< Holds the handle of the idle task. The idle task is created automatically when the scheduler is started. */
|
||||||
const UBaseType_t uxTopUsedPriority = configMAX_PRIORITIES - 1U;
|
|
||||||
|
/* 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;
|
||||||
|
|
||||||
/* Context switches are held pending while the scheduler is suspended. Also,
|
/* Context switches are held pending while the scheduler is suspended. Also,
|
||||||
* interrupts must not manipulate the xStateListItem of a TCB, or any of the
|
* interrupts must not manipulate the xStateListItem of a TCB, or any of the
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue