mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
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:
parent
03db672b8f
commit
dc7bd942d7
3
tasks.c
3
tasks.c
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue