From 7df62027cfeca59ff1e00c911fef6387a18450a4 Mon Sep 17 00:00:00 2001 From: Sudeep Mohanty Date: Sat, 2 Aug 2025 10:48:15 +0200 Subject: [PATCH] fix(freertos-smp): Stop unconditional yielding in vTaskPreemptionEnable --- tasks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks.c b/tasks.c index 96fc80075..8e671ee35 100644 --- a/tasks.c +++ b/tasks.c @@ -3334,7 +3334,7 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode, } else { - if( ( taskTASK_IS_RUNNING( pxTCB ) == pdTRUE ) ) + if( xYieldPendings[ pxTCB->xTaskRunState ] != pdFALSE && ( taskTASK_IS_RUNNING( pxTCB ) != pdFALSE ) ) { prvYieldCore( pxTCB->xTaskRunState ); }