File tree 1 file changed +11
-1
lines changed
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 )
1347
1347
{
1348
1348
eTaskState eReturn ;
1349
1349
List_t const * pxStateList ;
1350
+ List_t const * pxEventList ;
1350
1351
List_t const * pxDelayedList ;
1351
1352
List_t const * pxOverflowedDelayedList ;
1352
1353
const TCB_t * const pxTCB = xTask ;
@@ -1363,12 +1364,21 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB )
1363
1364
taskENTER_CRITICAL ();
1364
1365
{
1365
1366
pxStateList = listLIST_ITEM_CONTAINER ( & ( pxTCB -> xStateListItem ) );
1367
+ pxEventList = listLIST_ITEM_CONTAINER ( & ( pxTCB -> xEventListItem ) );
1366
1368
pxDelayedList = pxDelayedTaskList ;
1367
1369
pxOverflowedDelayedList = pxOverflowDelayedTaskList ;
1368
1370
}
1369
1371
taskEXIT_CRITICAL ();
1370
1372
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 ) )
1372
1382
{
1373
1383
/* The task being queried is referenced from one of the Blocked
1374
1384
* lists. */
You can’t perform that action at this time.
0 commit comments