Skip to content

Add ePendingReady state for task in a pending ready list #696

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/lexicon.txt
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,7 @@ epage
epc
epclear
epeds
ependingready
ependofwr
epint
epread
Expand Down
13 changes: 7 additions & 6 deletions include/task.h
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
8 changes: 3 additions & 5 deletions tasks.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) )
{
Expand Down Expand Up @@ -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;
}
}
Expand Down