freertos: Fix prvTaskIsTaskSuspended check

This commit fixes prvTaskIsTaskSuspended(). Both pending ready lists
should be checked to confirm that is truly suspended.

Closes https://github.com/espressif/esp-idf/issues/7564
pull/7764/head
Darian Leung 2021-09-27 23:20:27 +08:00
rodzic c1d3b295e8
commit 0df4e80b97
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -2093,7 +2093,7 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB,
if( listIS_CONTAINED_WITHIN( &xSuspendedTaskList, &( pxTCB->xStateListItem ) ) != pdFALSE )
{
/* Has the task already been resumed from within an ISR? */
if( listIS_CONTAINED_WITHIN( &xPendingReadyList[xPortGetCoreID()], &( pxTCB->xEventListItem )) ||
if( listIS_CONTAINED_WITHIN( &xPendingReadyList[xPortGetCoreID()], &( pxTCB->xEventListItem )) == pdFALSE &&
listIS_CONTAINED_WITHIN( &xPendingReadyList[!xPortGetCoreID()], &( pxTCB->xEventListItem )) == pdFALSE )
{
/* Is it in the suspended list because it is in the Suspended