fix(freertos/idf): Add workaround for same priority preemption in xTaskIncrementTick()

This commit temporarily disables a bugfixed introduced by FreeRTOS v10.5.1 that
ensures timed out tasks will only preempt if their priority is higher than the
currently running task.

This bugfix has been temporarily reversed due to some compatibility issues with
some IDF tests.
This commit is contained in:
Darian Leung
2023-10-19 19:48:08 +08:00
parent 4d14717e77
commit 6c6a6ad44a

View File

@ -3267,7 +3267,9 @@ BaseType_t xTaskIncrementTick( void )
* 0, we only need to context switch if the unblocked
* task can run on core 0 and has a higher priority
* than the current task. */
if( ( taskIS_AFFINITY_COMPATIBLE( 0, pxTCB->xCoreID ) == pdTRUE ) && ( pxTCB->uxPriority > pxCurrentTCBs[ 0 ]->uxPriority ) )
/* ">" changed to ">="" due to IDF incompatibility (IDF-8428) */
if( ( taskIS_AFFINITY_COMPATIBLE( 0, pxTCB->xCoreID ) == pdTRUE ) && ( pxTCB->uxPriority >= pxCurrentTCBs[ 0 ]->uxPriority ) )
{
xSwitchRequired = pdTRUE;
}