From 5e59b4a812e694972a54cab024c8ee14ab5c3150 Mon Sep 17 00:00:00 2001 From: Renz Bagaporo Date: Fri, 6 Mar 2020 14:27:23 +0800 Subject: [PATCH] freertos: mark port_xSchedulerRunning as volatile --- components/freertos/xtensa/port.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/freertos/xtensa/port.c b/components/freertos/xtensa/port.c index e96f71654..bdbfad205 100644 --- a/components/freertos/xtensa/port.c +++ b/components/freertos/xtensa/port.c @@ -151,7 +151,7 @@ static const char* TAG = "cpu_start"; // [refactor-todo]: might be appropriate t _Static_assert(tskNO_AFFINITY == CONFIG_FREERTOS_NO_AFFINITY, "incorrect tskNO_AFFINITY value"); /*-----------------------------------------------------------*/ -unsigned port_xSchedulerRunning[portNUM_PROCESSORS] = {0}; // Duplicate of inaccessible xSchedulerRunning; needed at startup to avoid counting nesting +volatile unsigned port_xSchedulerRunning[portNUM_PROCESSORS] = {0}; // Duplicate of inaccessible xSchedulerRunning; needed at startup to avoid counting nesting unsigned port_interruptNesting[portNUM_PROCESSORS] = {0}; // Interrupt nesting level. Increased/decreased in portasm.c, _frxt_int_enter/_frxt_int_exit BaseType_t port_uxCriticalNesting[portNUM_PROCESSORS] = {0}; BaseType_t port_uxOldInterruptState[portNUM_PROCESSORS] = {0};