Skip to content

Commit

Permalink
Fix #979, add stack size and priority to task info
Browse files Browse the repository at this point in the history
Add the task info and priority to the data structure written by
the QUERY_ALL_TASKS command.  Leaving out entry point, as it would
be a memory address and not useful/relevant outside the process.
  • Loading branch information
jphickey committed Feb 26, 2021
1 parent 672b2dc commit 2888450
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
4 changes: 3 additions & 1 deletion fsw/cfe-core/src/es/cfe_es_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -1208,9 +1208,11 @@ int32 CFE_ES_GetTaskInfo(CFE_ES_TaskInfo_t *TaskInfo, CFE_ES_TaskId_t TaskId)
TaskInfo->TaskId = CFE_ES_TaskRecordGetID(TaskRecPtr);

/*
** Get the Execution counter for the task
** Get the other stats for the task
*/
TaskInfo->ExecutionCounter = TaskRecPtr->ExecutionCounter;
TaskInfo->StackSize = TaskRecPtr->StartParams.StackSize;
TaskInfo->Priority = TaskRecPtr->StartParams.Priority;

/*
** Get the Application Details
Expand Down
13 changes: 8 additions & 5 deletions fsw/cfe-core/src/inc/cfe_es_msg.h
Original file line number Diff line number Diff line change
Expand Up @@ -1497,11 +1497,14 @@ typedef struct CFE_ES_AppInfo
*/
typedef struct CFE_ES_TaskInfo
{
CFE_ES_TaskId_t TaskId; /**< \brief Task Id */
uint32 ExecutionCounter; /**< \brief Task Execution Counter */
char TaskName[CFE_MISSION_MAX_API_LEN]; /**< \brief Task Name */
CFE_ES_AppId_t AppId; /**< \brief Parent Application ID */
char AppName[CFE_MISSION_MAX_API_LEN]; /**< \brief Parent Application Name */
CFE_ES_TaskId_t TaskId; /**< \brief Task Id */
uint32 ExecutionCounter; /**< \brief Task Execution Counter */
char TaskName[CFE_MISSION_MAX_API_LEN]; /**< \brief Task Name */
CFE_ES_AppId_t AppId; /**< \brief Parent Application ID */
char AppName[CFE_MISSION_MAX_API_LEN]; /**< \brief Parent Application Name */
CFE_ES_MemOffset_t StackSize; /**< Size of task stack */
CFE_ES_TaskPriority_Atom_t Priority; /**< Priority of task */
uint8 Spare[2]; /**< Spare bytes for alignment */
} CFE_ES_TaskInfo_t;

/**
Expand Down

0 comments on commit 2888450

Please sign in to comment.