diff --git a/.github/lexicon.txt b/.github/lexicon.txt index 1a7d4852dc2..677ea79c7c6 100644 --- a/.github/lexicon.txt +++ b/.github/lexicon.txt @@ -607,6 +607,7 @@ epage epc epclear epeds +ependingready ependofwr epint epread diff --git a/include/task.h b/include/task.h index 702f74dce9b..3909ed66e13 100644 --- a/include/task.h +++ b/include/task.h @@ -95,12 +95,13 @@ typedef BaseType_t (* TaskHookFunction_t)( void * ); /* Task states returned by eTaskGetState. */ typedef enum { - eRunning = 0, /* A task is querying the state of itself, so must be running. */ - eReady, /* The task being queried is in a ready or pending ready list. */ - eBlocked, /* The task being queried is in the Blocked state. */ - eSuspended, /* The task being queried is in the Suspended state, or is in the Blocked state with an infinite time out. */ - eDeleted, /* The task being queried has been deleted, but its TCB has not yet been freed. */ - eInvalid /* Used as an 'invalid state' value. */ + eRunning = 0, /* A task is querying the state of itself, so must be running. */ + eReady, /* The task being queried is in a ready list. */ + ePendingReady, /* The task being queried is in a pending ready list. */ + eBlocked, /* The task being queried is in the Blocked state. */ + eSuspended, /* The task being queried is in the Suspended state, or is in the Blocked state with an infinite time out. */ + eDeleted, /* The task being queried has been deleted, but its TCB has not yet been freed. */ + eInvalid /* Used as an 'invalid state' value. */ } eTaskState; /* Actions that can be performed when vTaskNotify() is called. */ diff --git a/tasks.c b/tasks.c index e2861dd94aa..23f55a30ec7 100644 --- a/tasks.c +++ b/tasks.c @@ -1376,10 +1376,8 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB ) if( pxEventList == &xPendingReadyList ) { - /* The task has been placed on the pending ready list, so its - * state is eReady regardless of what list the task's state list - * item is currently placed on. */ - eReturn = eReady; + /* The task has been placed on the pending ready list. */ + eReturn = ePendingReady; } else if( ( pxStateList == pxDelayedList ) || ( pxStateList == pxOverflowedDelayedList ) ) { @@ -1442,7 +1440,7 @@ static void prvAddNewTaskToReadyList( TCB_t * pxNewTCB ) else /*lint !e525 Negative indentation is intended to make use of pre-processor clearer. */ { /* If the task is not in any other state, it must be in the - * Ready (including pending ready) state. */ + * Ready state. */ eReturn = eReady; } }