Update uxTaskGetSystemState for tasks in pending ready list (#702)

* Update uxTaskGetSystemState to sync with eTaskGetState
* Update in vTaskGetInfo for tasks in pending ready list should be in
  ready state.
This commit is contained in:
chinglee-iot 2023-07-10 14:29:38 +08:00 committed by GitHub
parent d0a490e491
commit 77ec05e641
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

12
tasks.c
View file

@ -3843,6 +3843,18 @@ static void prvCheckTasksWaitingTermination( void )
} }
} }
#endif /* INCLUDE_vTaskSuspend */ #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 else