SMP: Ensure idle tasks have affinity set to run only on their own core.

Signed-off-by: Ian Thompson <ianst@cadence.com>
This commit is contained in:
Ian Thompson 2025-01-14 19:37:00 -08:00
parent 03db672b8f
commit dc7bd942d7

View file

@ -3676,6 +3676,9 @@ static BaseType_t prvCreateIdleTasks( void )
/* Assign idle task to each core before SMP scheduler is running. */ /* Assign idle task to each core before SMP scheduler is running. */
xIdleTaskHandles[ xCoreID ]->xTaskRunState = xCoreID; xIdleTaskHandles[ xCoreID ]->xTaskRunState = xCoreID;
pxCurrentTCBs[ xCoreID ] = xIdleTaskHandles[ xCoreID ]; pxCurrentTCBs[ xCoreID ] = xIdleTaskHandles[ xCoreID ];
#if ( configUSE_CORE_AFFINITY == 1 )
vTaskCoreAffinitySet(xIdleTaskHandles[ xCoreID ], 1 << xCoreID);
#endif
} }
#endif #endif
} }