freertos-smp: Update prvYieldCore() to fix compile warning

prvYieldCore() leads to an array-out-of-bounds error when compiled with
-Os optimization and configNUM_CORES = 1. This commit avoids this
compile warning by compiling out the part of code which is unnecessary
when configNUM_CORES is 1.
This commit is contained in:
Sudeep Mohanty
2022-06-17 09:11:02 +02:00
parent 7f109b8181
commit 7726f343e8

View File

@@ -709,11 +709,17 @@ static void prvYieldCore( BaseType_t xCoreID )
{
xYieldPendings[ xCoreID ] = pdTRUE;
}
else
{
portYIELD_CORE( xCoreID );
pxCurrentTCBs[ xCoreID ]->xTaskRunState = taskTASK_YIELDING;
}
#ifdef ESP_PLATFORM
// TODO: IDF-5256
#if ( configNUM_CORES > 1 )
else
{
portYIELD_CORE( xCoreID );
pxCurrentTCBs[ xCoreID ]->xTaskRunState = taskTASK_YIELDING;
}
#endif /* ( configNUM_CORES > 1 ) */
#endif /* ESP_PLATFORM */
}
}