From 60bca5e8b2062943c3a03f591685a4c7c4f4311e 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 6f256977b..9dedc7226 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 ); }