Skip to content

Commit

Permalink
Update uxTaskGetSystemState for tasks in pending ready list (#702)
Browse files Browse the repository at this point in the history
* Update uxTaskGetSystemState to sync with eTaskGetState
* Update in vTaskGetInfo for tasks in pending ready list should be in
  ready state.
  • Loading branch information
chinglee-iot authored Jul 10, 2023
1 parent d0a490e commit 77ec05e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tasks.c
Original file line number Diff line number Diff line change
Expand Up @@ -3843,6 +3843,18 @@ static void prvCheckTasksWaitingTermination( void )
}
}
#endif /* INCLUDE_vTaskSuspend */

/* Tasks can be in pending ready list and other state list at the
* same time. These tasks are in ready state no matter what state
* list the task is in. */
taskENTER_CRITICAL();
{
if( listIS_CONTAINED_WITHIN( &xPendingReadyList, &( pxTCB->xEventListItem ) ) != pdFALSE )
{
pxTaskStatus->eCurrentState = eReady;
}
}
taskEXIT_CRITICAL();
}
}
else
Expand Down

0 comments on commit 77ec05e

Please sign in to comment.