Merge branch 'bugfix/esp32s2_o2_op_v4.1' into 'release/v4.1'

freertos: fix build error at -O2 optimization level (v4.1)

See merge request espressif/esp-idf!10304
This commit is contained in:
Angus Gratton 2020-09-21 15:15:16 +08:00
commit d83520060c

View File

@ -645,10 +645,11 @@ static void prvAddNewTaskToReadyList( TCB_t *pxNewTCB, TaskFunction_t pxTaskCode
*/
void taskYIELD_OTHER_CORE( BaseType_t xCoreID, UBaseType_t uxPriority )
{
TCB_t *curTCB = pxCurrentTCB[xCoreID];
TCB_t *curTCB;
BaseType_t i;
if (xCoreID != tskNO_AFFINITY) {
curTCB = pxCurrentTCB[xCoreID];
if ( curTCB->uxPriority < uxPriority ) {
vPortYieldOtherCore( xCoreID );
}