Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize xTaskIncrementTick for configNUMBER_OF_CORES > 1 #1118

Merged
merged 2 commits into from
Aug 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions tasks.c
Original file line number Diff line number Diff line change
Expand Up @@ -4698,10 +4698,6 @@ BaseType_t xTaskIncrementTick( void )
TickType_t xItemValue;
BaseType_t xSwitchRequired = pdFALSE;

#if ( configUSE_PREEMPTION == 1 ) && ( configNUMBER_OF_CORES > 1 )
BaseType_t xYieldRequiredForCore[ configNUMBER_OF_CORES ] = { pdFALSE };
#endif /* #if ( configUSE_PREEMPTION == 1 ) && ( configNUMBER_OF_CORES > 1 ) */

traceENTER_xTaskIncrementTick();

/* Called by the portable layer each time a tick interrupt occurs.
Expand Down Expand Up @@ -4853,7 +4849,7 @@ BaseType_t xTaskIncrementTick( void )
{
if( listCURRENT_LIST_LENGTH( &( pxReadyTasksLists[ pxCurrentTCBs[ xCoreID ]->uxPriority ] ) ) > 1U )
{
xYieldRequiredForCore[ xCoreID ] = pdTRUE;
xYieldPendings[ xCoreID ] = pdTRUE;
}
else
{
Expand Down Expand Up @@ -4905,7 +4901,7 @@ BaseType_t xTaskIncrementTick( void )
if( pxCurrentTCBs[ xCoreID ]->xPreemptionDisable == pdFALSE )
#endif
{
if( ( xYieldRequiredForCore[ xCoreID ] != pdFALSE ) || ( xYieldPendings[ xCoreID ] != pdFALSE ) )
if( xYieldPendings[ xCoreID ] != pdFALSE )
{
if( xCoreID == xCurrentCoreID )
{
Expand Down
Loading