Skip to content

Commit 7df6202

Browse files
fix(freertos-smp): Stop unconditional yielding in vTaskPreemptionEnable
1 parent 40a991d commit 7df6202

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tasks.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3334,7 +3334,7 @@ static void prvInitialiseNewTask( TaskFunction_t pxTaskCode,
33343334
}
33353335
else
33363336
{
3337-
if( ( taskTASK_IS_RUNNING( pxTCB ) == pdTRUE ) )
3337+
if( xYieldPendings[ pxTCB->xTaskRunState ] != pdFALSE && ( taskTASK_IS_RUNNING( pxTCB ) != pdFALSE ) )
33383338
{
33393339
prvYieldCore( pxTCB->xTaskRunState );
33403340
}

0 commit comments

Comments
 (0)