Skip to content

Commit 77ec05e

Browse files
authored
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.
1 parent d0a490e commit 77ec05e

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tasks.c

+12
Original file line numberDiff line numberDiff line change
@@ -3843,6 +3843,18 @@ static void prvCheckTasksWaitingTermination( void )
38433843
}
38443844
}
38453845
#endif /* INCLUDE_vTaskSuspend */
3846+
3847+
/* Tasks can be in pending ready list and other state list at the
3848+
* same time. These tasks are in ready state no matter what state
3849+
* list the task is in. */
3850+
taskENTER_CRITICAL();
3851+
{
3852+
if( listIS_CONTAINED_WITHIN( &xPendingReadyList, &( pxTCB->xEventListItem ) ) != pdFALSE )
3853+
{
3854+
pxTaskStatus->eCurrentState = eReady;
3855+
}
3856+
}
3857+
taskEXIT_CRITICAL();
38463858
}
38473859
}
38483860
else

0 commit comments

Comments
 (0)