mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2026-07-10 13:29:45 -04:00
Add affinity to IDLE tasks in SMP systems (#1415)
This commit is contained in:
parent
a8c9d35152
commit
d3b074a01e
3 changed files with 17 additions and 1 deletions
7
tasks.c
7
tasks.c
|
|
@ -3687,8 +3687,13 @@ static BaseType_t prvCreateIdleTasks( void )
|
|||
/* Assign idle task to each core before SMP scheduler is running. */
|
||||
xIdleTaskHandles[ xCoreID ]->xTaskRunState = xCoreID;
|
||||
pxCurrentTCBs[ xCoreID ] = xIdleTaskHandles[ xCoreID ];
|
||||
#if ( ( configIDLE_AFFINITY == 1 ) && ( configUSE_CORE_AFFINITY == 1 ) )
|
||||
{
|
||||
xIdleTaskHandles[ xCoreID ]->uxCoreAffinityMask = ( ( UBaseType_t ) 1U << ( UBaseType_t ) xCoreID );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
#endif /* if ( configNUMBER_OF_CORES == 1 ) */
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue