File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -1347,6 +1347,7 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB )
13471347 {
13481348 eTaskState eReturn ;
13491349 List_t const * pxStateList ;
1350+ List_t const * pxEventList ;
13501351 List_t const * pxDelayedList ;
13511352 List_t const * pxOverflowedDelayedList ;
13521353 const TCB_t * const pxTCB = xTask ;
@@ -1363,12 +1364,21 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB )
13631364 taskENTER_CRITICAL ();
13641365 {
13651366 pxStateList = listLIST_ITEM_CONTAINER ( & ( pxTCB -> xStateListItem ) );
1367+ pxEventList = listLIST_ITEM_CONTAINER ( & ( pxTCB -> xEventListItem ) );
13661368 pxDelayedList = pxDelayedTaskList ;
13671369 pxOverflowedDelayedList = pxOverflowDelayedTaskList ;
13681370 }
13691371 taskEXIT_CRITICAL ();
13701372
1371- if ( ( pxStateList == pxDelayedList ) || ( pxStateList == pxOverflowedDelayedList ) )
1373+ if ( pxEventList == & xPendingReadyList )
1374+ {
1375+ /* The task has been placed on the pending ready list, so its
1376+ * state is eReady regardless of what list the task's state list
1377+ * item is currently placed on. */
1378+ eReturn = eReady ;
1379+ }
1380+
1381+ else if ( ( pxStateList == pxDelayedList ) || ( pxStateList == pxOverflowedDelayedList ) )
13721382 {
13731383 /* The task being queried is referenced from one of the Blocked
13741384 * lists. */
You can’t perform that action at this time.
0 commit comments