Add affinity to IDLE tasks in SMP systems (#1415)

This commit is contained in:
rus084 2026-05-17 23:36:59 +03:00 committed by GitHub
parent a8c9d35152
commit d3b074a01e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 17 additions and 1 deletions

View file

@ -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 ) */
}
}