Added a little intelligence to eTaskGetState() so it can distinguish between a suspended task and a task that is indefinitely blocked on an event.

This commit is contained in:
Richard Barry 2013-10-22 09:30:58 +00:00
parent bafda11518
commit 25bab250b6

View file

@ -844,9 +844,17 @@ tskTCB * pxNewTCB;
else if( pxStateList == &xSuspendedTaskList )
{
/* The task being queried is referenced from the suspended
list. */
list. Is it genuinely suspended or is it block
indefinitely? */
if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) == NULL )
{
eReturn = eSuspended;
}
else
{
eReturn = eBlocked;
}
}
#endif
#if ( INCLUDE_vTaskDelete == 1 )