Merge branch 'fix/priority_inv_when_remove_from_unordered_event_list' into 'master'

fix(freertos): Fixed priority inversion when setting event group bits

Closes IDF-8160

See merge request espressif/esp-idf!33953
This commit is contained in:
Sudeep Mohanty
2024-10-11 17:49:08 +08:00
2 changed files with 64 additions and 4 deletions

View File

@@ -4123,10 +4123,19 @@ void vTaskRemoveFromUnorderedEventList( ListItem_t * pxEventListItem,
if( taskIS_YIELD_REQUIRED( pxUnblockedTCB, pdFALSE ) == pdTRUE )
{
/* The unblocked task has a priority above that of the calling task, so
* a context switch is required. This function is called with the
* scheduler suspended so xYieldPending is set so the context switch
* occurs immediately that the scheduler is resumed (unsuspended). */
xYieldPending[ xCurCoreID ] = pdTRUE;
* a context switch is required. */
#if ( configNUM_CORES > 1 )
/* In SMP mode, this function is called from a critical section, so we
* yield the current core to schedule the unblocked task. */
portYIELD_WITHIN_API();
#else /* configNUM_CORES > 1 */
/* In single-core mode, this function is called with the scheduler suspended
* so xYieldPending is set so the context switch occurs immediately once the
* scheduler is resumed (unsuspended). */
xYieldPending[ xCurCoreID ] = pdTRUE;
#endif /* configNUM_CORES > 1 */
}
}
}