mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-11 13:54:16 -04:00
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:
parent
bafda11518
commit
25bab250b6
1 changed files with 10 additions and 2 deletions
|
@ -844,8 +844,16 @@ tskTCB * pxNewTCB;
|
||||||
else if( pxStateList == &xSuspendedTaskList )
|
else if( pxStateList == &xSuspendedTaskList )
|
||||||
{
|
{
|
||||||
/* The task being queried is referenced from the suspended
|
/* The task being queried is referenced from the suspended
|
||||||
list. */
|
list. Is it genuinely suspended or is it block
|
||||||
eReturn = eSuspended;
|
indefinitely? */
|
||||||
|
if( listLIST_ITEM_CONTAINER( &( pxTCB->xEventListItem ) ) == NULL )
|
||||||
|
{
|
||||||
|
eReturn = eSuspended;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
eReturn = eBlocked;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue