Skip to content

Commit dc7bd94

Browse files
committed
SMP: Ensure idle tasks have affinity set to run only on their own core.
Signed-off-by: Ian Thompson <[email protected]>
1 parent 03db672 commit dc7bd94

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tasks.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3676,6 +3676,9 @@ static BaseType_t prvCreateIdleTasks( void )
36763676
/* Assign idle task to each core before SMP scheduler is running. */
36773677
xIdleTaskHandles[ xCoreID ]->xTaskRunState = xCoreID;
36783678
pxCurrentTCBs[ xCoreID ] = xIdleTaskHandles[ xCoreID ];
3679+
#if ( configUSE_CORE_AFFINITY == 1 )
3680+
vTaskCoreAffinitySet(xIdleTaskHandles[ xCoreID ], 1 << xCoreID);
3681+
#endif
36793682
}
36803683
#endif
36813684
}

0 commit comments

Comments
 (0)