Skip to content

Commit 0df4e80

Browse files
committed
freertos: Fix prvTaskIsTaskSuspended check
This commit fixes prvTaskIsTaskSuspended(). Both pending ready lists should be checked to confirm that is truly suspended. Closes espressif#7564
1 parent c1d3b29 commit 0df4e80

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/freertos/tasks.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2093,7 +2093,7 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB,
20932093
if( listIS_CONTAINED_WITHIN( &xSuspendedTaskList, &( pxTCB->xStateListItem ) ) != pdFALSE )
20942094
{
20952095
/* Has the task already been resumed from within an ISR? */
2096-
if( listIS_CONTAINED_WITHIN( &xPendingReadyList[xPortGetCoreID()], &( pxTCB->xEventListItem )) ||
2096+
if( listIS_CONTAINED_WITHIN( &xPendingReadyList[xPortGetCoreID()], &( pxTCB->xEventListItem )) == pdFALSE &&
20972097
listIS_CONTAINED_WITHIN( &xPendingReadyList[!xPortGetCoreID()], &( pxTCB->xEventListItem )) == pdFALSE )
20982098
{
20992099
/* Is it in the suspended list because it is in the Suspended

0 commit comments

Comments
 (0)