mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
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:
parent
d0a490e491
commit
77ec05e641
12
tasks.c
12
tasks.c
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue