From 2888450aa98dabe018ac456a3288dada5bb8a633 Mon Sep 17 00:00:00 2001 From: Joseph Hickey Date: Mon, 8 Feb 2021 10:21:01 -0500 Subject: [PATCH] Fix #979, add stack size and priority to task info 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. --- fsw/cfe-core/src/es/cfe_es_api.c | 4 +++- fsw/cfe-core/src/inc/cfe_es_msg.h | 13 ++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/fsw/cfe-core/src/es/cfe_es_api.c b/fsw/cfe-core/src/es/cfe_es_api.c index 54304aecb..02e6ff7f5 100644 --- a/fsw/cfe-core/src/es/cfe_es_api.c +++ b/fsw/cfe-core/src/es/cfe_es_api.c @@ -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 diff --git a/fsw/cfe-core/src/inc/cfe_es_msg.h b/fsw/cfe-core/src/inc/cfe_es_msg.h index 83ba04c39..de4bd34e9 100644 --- a/fsw/cfe-core/src/inc/cfe_es_msg.h +++ b/fsw/cfe-core/src/inc/cfe_es_msg.h @@ -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; /**