From d45a11f9e754c79a87ace7b1ce6df7f7ed9cc616 Mon Sep 17 00:00:00 2001 From: GUVWAF <78759985+GUVWAF@users.noreply.github.com> Date: Tue, 5 Dec 2023 20:53:41 +0100 Subject: [PATCH] Disable interrupts first when idling core (#1883) --- libraries/FreeRTOS/src/variantHooks.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/FreeRTOS/src/variantHooks.cpp b/libraries/FreeRTOS/src/variantHooks.cpp index 4bacefb..5872a3b 100644 --- a/libraries/FreeRTOS/src/variantHooks.cpp +++ b/libraries/FreeRTOS/src/variantHooks.cpp @@ -165,8 +165,8 @@ static void __no_inline_not_in_flash_func(IdleThisCore)(void *param) { (void) param; while (true) { ulTaskNotifyTake(pdTRUE, portMAX_DELAY); - vTaskPreemptionDisable(nullptr); portDISABLE_INTERRUPTS(); + vTaskPreemptionDisable(nullptr); __otherCoreIdled = true; while (__otherCoreIdled) { /* noop */