File tree 1 file changed +10
-1
lines changed 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -1351,6 +1351,7 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB )
1351
1351
{
1352
1352
eTaskState eReturn ;
1353
1353
List_t const * pxStateList ;
1354
+ List_t const * pxEventList ;
1354
1355
List_t const * pxDelayedList ;
1355
1356
List_t const * pxOverflowedDelayedList ;
1356
1357
const TCB_t * const pxTCB = xTask ;
@@ -1367,12 +1368,20 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB )
1367
1368
taskENTER_CRITICAL ();
1368
1369
{
1369
1370
pxStateList = listLIST_ITEM_CONTAINER ( & ( pxTCB -> xStateListItem ) );
1371
+ pxEventList = listLIST_ITEM_CONTAINER ( & ( pxTCB -> xEventListItem ) );
1370
1372
pxDelayedList = pxDelayedTaskList ;
1371
1373
pxOverflowedDelayedList = pxOverflowDelayedTaskList ;
1372
1374
}
1373
1375
taskEXIT_CRITICAL ();
1374
1376
1375
- if ( ( pxStateList == pxDelayedList ) || ( pxStateList == pxOverflowedDelayedList ) )
1377
+ if ( pxEventList == & xPendingReadyList )
1378
+ {
1379
+ /* The task has been placed on the pending ready list, so its
1380
+ * state is eReady regardless of what list the task's state list
1381
+ * item is currently placed on. */
1382
+ eReturn = eReady ;
1383
+ }
1384
+ else if ( ( pxStateList == pxDelayedList ) || ( pxStateList == pxOverflowedDelayedList ) )
1376
1385
{
1377
1386
/* The task being queried is referenced from one of the Blocked
1378
1387
* lists. */
You can’t perform that action at this time.
0 commit comments