diff --git a/docs/cFE Application Developers Guide.md b/docs/cFE Application Developers Guide.md
index 28ae5a10f..ac995d283 100644
--- a/docs/cFE Application Developers Guide.md
+++ b/docs/cFE Application Developers Guide.md
@@ -313,20 +313,20 @@ directory is described as a note under each folder.
![](.//media/cFE_Application_Developers_Guide_image6.png)
-Each cFE core component is itself a modular entity, all of which work together to form the
+Each cFE core component is itself a modular entity, all of which work together to form the
complete cFE core executive. These modules are all contained under the `modules` subdirectory:
| **Directory** | **Content** |
|:------------------------|:------------------------------------------------------------------------------------------------------------------ |
| `modules/core_api/` | Contains the public interface definition of the complete CFE core - public API/headers only, no implementation |
| `modules/core_private/` | Contains the inter-module interface definition of the CFE core - internal API/headers only, no implementation |
-| `modules/es/` | Implementation of the Executive Services (ES) core module - provides app and task management |
-| `modules/evs/` | Implementation of the Event Services (EVS) core module - manages sending of events on behalf of other apps |
-| `modules/fs/` | Implementation of the File Services (FS) core module - defines file-related functions |
-| `modules/msg/` | Implementation of the Message (MSG) core module - defines message header manipulation/access routines |
-| `modules/resourceid/` | Implementation of the Resource ID core module - maniplation/access of system resource IDs (AppID, PipeID, etc.) |
-| `modules/sb/` | Implementation of the Software Bus (SB) core module - sends messages between applications |
-| `modules/tbl/` | Implementation of the Table Services (TBL) core module - manages runtime tables |
+| `modules/es/` | Implementation of the Executive Services (ES) core module - provides app and task management |
+| `modules/evs/` | Implementation of the Event Services (EVS) core module - manages sending of events on behalf of other apps |
+| `modules/fs/` | Implementation of the File Services (FS) core module - defines file-related functions |
+| `modules/msg/` | Implementation of the Message (MSG) core module - defines message header manipulation/access routines |
+| `modules/resourceid/` | Implementation of the Resource ID core module - maniplation/access of system resource IDs (AppID, PipeID, etc.) |
+| `modules/sb/` | Implementation of the Software Bus (SB) core module - sends messages between applications |
+| `modules/tbl/` | Implementation of the Table Services (TBL) core module - manages runtime tables |
| `modules/time/` | Implementation of the Time Services (TIME) core module - manages timing and synchronization |
**NOTE**: The modules contained here constitute the "reference" implementation of each module. The CMake build system also permits advanced users
@@ -357,7 +357,7 @@ Each module directory is in turn divided into subdirectories as follows:
In order for applications to use and call cFE service functions, the
developer must include the appropriate header files in their source
-code.
+code.
The cFE header files are split into several parts/sections, allowing
application/libraries to individually select the parts they need. The
@@ -373,11 +373,11 @@ naming convention is as follows:
In general the files are scoped such that an application/library should only need to include the information it
actually needs to use for the task it performs. For instance, if a tool needs to interpret a data file generated
by CFE ES, only the `cfe_es_extern_typedefs.h` file should be required. To send commands or interpret telemetry, the
-`cfe_es_msg.h` may be used. If a library builds upon data types or extends functions from the ES API, then the
+`cfe_es_msg.h` may be used. If a library builds upon data types or extends functions from the ES API, then the
`cfe_es_api_typedefs.h` header may be used.
An "unqualified" header file (with no extra suffix) provides the complete runtime API definition for the component.
-This includes all API function prototypes and is intended for use in C source files. The following API header files
+This includes all API function prototypes and is intended for use in C source files. The following API header files
are provided by cFE:
| **Filename** | **Contents** |
@@ -392,11 +392,11 @@ are provided by cFE:
| cfe_time.h | cFE Time Service Interface |
-**NOTE**: The files listed above provide function prototypes and are intended to be used by C source files
+**NOTE**: The files listed above provide function prototypes and are intended to be used by C source files
that contain code which needs to invoke the function(s) prototyped within them. When referencing the
data types or macros from another header file, the targeted/qualified header should be used instead.
-As a rule of thumb, files listed in the first table (with suffix) should be included from within other
+As a rule of thumb, files listed in the first table (with suffix) should be included from within other
headers, while files listed in the second table (without suffix) should be used by source files.
Finally, to simplify application headers, a single "all-inclusive" cFE header is also provided:
@@ -501,12 +501,12 @@ applications.
## 4.2 Best Practices
### 4.2.1 cFS Application Template
-Applications designed to interface with the cFE should follow standard templates.
+Applications designed to interface with the cFE should follow standard templates.
Reference sample_app on Github for “live” example.
| **Directory** | **Descriptions** |
|:--------------------------------------|:-------------------------------------------------------------------------------------------------------------|
-| fsw/ | All components which are used on/deployed to the actual target or define the interface to those components |
+| fsw/ | All components which are used on/deployed to the actual target or define the interface to those components |
| fsw/inc/ | Public/Interface headers for the component |
| fsw/src/ | Source files and private headers for the component |
| tables/ | Example/Initial table definitions |
@@ -525,7 +525,7 @@ Reference sample_app on Github for “live” example.
In addition to showing the standard structure of a cFS application, the
sample_app also demonstrates how to interface with cFS libraries and table
-services.
+services.
### 4.2.2 Avoid "Endian-ness" Dependencies
@@ -558,7 +558,7 @@ Examples of items that must be shared with other Applications include
Message IDs and Message data structures. Inter- application communication
should rely on the published interfaces described above (generally using the
software bus) rather than directly calling functions internal to another
-application.
+application.
Examples of items that do not need to be shared with other Applications include
Table IDs, Table data structures, Event IDs and Pipe IDs. Tables are not
@@ -595,9 +595,9 @@ found in the OSAL Library API documentation.
## 5.1 Application Registration
-All cFE Applications must register immediately with ES when started.
-This is accomplished with the CFE_ES_RegisterApp function and it
-should be the first function called by a cFE Application's main task.
+All cFE Applications are now automatically registered with ES before the
+user-specified entry point is invoked. There is no specific registration
+function to invoke as was necessary in older versions of cFE.
## 5.2 Application Names and IDs
@@ -625,10 +625,11 @@ additional threads that are spawned by this thread are referred to as
Child Tasks. There are a handful of functions provided by the Executive
Services for controlling Child Tasks. The first is
CFE_ES_CreateChildTask. This function spawns a Child Task that is
-"owned" by the Main Task. Each of the Child Tasks must then register
-with ES via the CFE_ES_RegisterChildTask function. The remaining
-functions, CFE_ES_DeleteChildTask, CFE_ES_SuspendChildTask and
-CFE_ES_ResumeChildTask can control the existence and execution of the
+"owned" by the Main Task. This child task is automatically registered
+with ES before invoking the entry point.
+
+The remaining functions, CFE_ES_DeleteChildTask, CFE_ES_SuspendChildTask
+and CFE_ES_ResumeChildTask can control the existence and execution of the
Child Task. All of these functions require the task ID that is returned
by the CFE_ES_CreateChildTask function in order to identify the Child
Task. Note that Child Tasks can only be created from an Application's
@@ -736,7 +737,7 @@ osobjtab.c file for the processor.
A binary semaphore can be created using the OS_BinSemCreate function. Upon
success, the OS_BinSemCreate function sets the sem_id parameter to the ID of
the newly-created resource. This ID is used in all other functions that use
-the binary semaphore.
+the binary semaphore.
```
int32 OS_BinSemCreate(uint32 *xxx_SEM_ID, const char *xxx_SEM_NAME,
@@ -780,10 +781,10 @@ implement a kind of handshake between its main task and its child task.
### 5.7.3.1 Counting Semaphore Functions
-A counting semaphore can be created using the OS_CountSemCreate function.
+A counting semaphore can be created using the OS_CountSemCreate function.
Upon success, the OS_CountSemCreate function sets the sem_id parameter to the
ID of the newly-created resource. This ID is used in all other functions that
-use the binary semaphore.
+use the binary semaphore.
```
int32 OS_CountSemCreate(uint32 *xxx_SEM_ID, const char *xxx_SEM_NAME,
@@ -895,7 +896,7 @@ to the OSAL Library API).
## 5.8 Interrupt Handling
-OSAL interrupt handling functions have been deprecated due to
+OSAL interrupt handling functions have been deprecated due to
platform dependencies, incomplete testing, and incomplete implementaion
No longer supporting abstracted interrupt handling API from OSAL. Could
@@ -1097,7 +1098,7 @@ int32 SAMPLE_TaskInit(void)
{
/* Critical Data Store already existed, we need to get a */
/* copy of its current contents to see if we can work use it */
- Status = CFE_ES_RestoreFromCDS(&SAMPLE_MyCDSDataType_t,
+ Status = CFE_ES_RestoreFromCDS(&SAMPLE_MyCDSDataType_t,
SAMPLE_TaskData.MyCDSHandle);
if (Status == CFE_SUCCESS)
@@ -1165,7 +1166,7 @@ void SAMPLE_TaskMain(void)
### 5.10.4 Standard CRC Calculations
There are many Applications that require a validation of received data or of
-data in memory. This is usually done by a Cyclic Redundancy Check (CRC).
+data in memory. This is usually done by a Cyclic Redundancy Check (CRC).
There are many different ways to calculate a CRC. To help ensure that the
calculation is done consistently for a mission, the Executive Services provides
an API for a CRC calculation that can be used by all Applications on a mission.
@@ -1269,7 +1270,7 @@ main execution loop. Applications can track performance of multiple sections
of code, but must define a unique "performance id" (or "perfid") for each
segment of code to monitor. Applications typically define these perfids in
their xx_mission_cfg.h file. A common pattern for performance monitoring is
-shown below.
+shown below.
```
FILE: xx_app.c
@@ -1280,9 +1281,6 @@ void XX_AppMain(void)
CFE_SB_Buffer_t *SBBufPtr;
int32 Result = CFE_SUCCESS;
- /* Register application */
- Result = CFE_ES_RegisterApp();
-
/* Performance Log (start time counter) */
CFE_ES_PerfLogEntry(XX_APPMAIN_PERF_ID);
@@ -1773,7 +1771,7 @@ sizeof(CFE_MSG_CommandHeader_t) and sizeof(CFE_MSG_TelemetryHeader_t) respective
It is important to note that some API calls require the presence of a
particular header type and will return an error if the other header type
-is present instead. The following section provides more detail.
+is present instead. The following section provides more detail.
### 6.5.2 Setting Message Header Information
@@ -1805,7 +1803,7 @@ The preference is to use CFE_MSG_SetSize and actual packet structure
information when available.
### 6.5.2.1 Modifying Command Message Header Information
-The most common update for command messages is to set the command code.
+The most common update for command messages is to set the command code.
This is done through the CFE_MSG_SetFcnCode() API call. This code is used
to distinguish between multiple commands that share a Message ID. It is
common practice for an application to have a single "CMD_MID" to capture
@@ -1937,7 +1935,7 @@ a CFE_SB_NO_MESSAGE status code.
After a message is received, the SB Message Header accessor functions (as
described in Section 6.5.3) should be used to identify the message so that
-the application can react to it appropriately.
+the application can react to it appropriately.
## 6.8 Improving Message Transfer Performance for Large Messages
@@ -2043,7 +2041,7 @@ SAMPLE_AppData_t SAMPLE_AppData; /* Instantiate Task Data */
The following are recommended "best practices" for applications using EVS.
1. Applications should use the Software Bus for all communication with other
applications.
-2. Pipe depth and message limits are dependent on the entire software system.
+2. Pipe depth and message limits are dependent on the entire software system.
Consider both the receiving application and any sending application(s) when
choosing those limits.
3. Applications shall always use AB API functions to read or manipulate the SB
@@ -2051,7 +2049,7 @@ The following are recommended "best practices" for applications using EVS.
4. Applications should maintain a command counter and a command error counter
in housekeeping telemetry.
5. Applications should support a "No-operation" command and a "Reset Counters"
- command.
+ command.
6. Every application should have at least one pipe.
# 7. Event Service Interface
@@ -2072,7 +2070,7 @@ Child Task.
Event messages are implemented as software bus messages. It is important
for developers to note that Event Messages are not automatically sent
as telemetry. A Telemetry Output (or equivalent) application must be
-configured to downlink event messages if they need to be sent as telemetry.
+configured to downlink event messages if they need to be sent as telemetry.
## 7.2 Event Types
@@ -2129,7 +2127,7 @@ the short format does not include the text string portion of the message.
Because of this, it is very important that Event Messages IDs be unique
across an Application, including all Child Tasks. Unique message IDs will
allow a message to be understood even in "short format" when the text
-string is unavailable to provide supplemental information.
+string is unavailable to provide supplemental information.
## 7.4 Event Service Registration
@@ -2137,7 +2135,7 @@ Applications must register with the EVS in order to use cFE event
services. If an application has registered with EVS, then all of its
Child Tasks are also registered and able to send Event Messages. cFE
libraries however are not able to register for EVS or send Event
-Messages.
+Messages.
Event services include the sending and filtering of event
messages. EVS registration is performed using the CFE_EVS_Register
@@ -2384,7 +2382,7 @@ CFE_EVS_Unregister ();
The following are recommended "best practices" for applications using EVS.
1. Event Message IDs should be unique across an application so that an
- event can be identified even without text.
+ event can be identified even without text.
2. The "No Operation" command in an application should send an Information
Event Message with the application's version number.
3. Abide by the guidance in Section 7.5.1 when creating event message
@@ -2396,7 +2394,7 @@ The following are recommended "best practices" for applications using EVS.
5. Ensure that adequate debug messages are left in an application to allow
debugging to occur in flight if necessary. When an application is
complete, all remaining debug "printf" statements should be either
- removed or converted to Debug event messages.
+ removed or converted to Debug event messages.
# 8. Table Service Interface
@@ -2511,7 +2509,7 @@ they wish to have created and the cFE responds with an Application
unique Table Handle. An example of this process is shown in Section 8.5.1.
It should be noted that the Table Services automatically makes the table name
-processor specific by prepending the Application name to the given table name.
+processor specific by prepending the Application name to the given table name.
Therefore, after the above example is executed, Table Services would have
added a table with the name “SAMPLE.MyTableName” to the Table Registry.
If an Application is sharing a Table that is created by another Application,
@@ -2781,13 +2779,13 @@ xx
| |----xx_tbl.c
|
|----tables
- | |----xx_table1.c
+ | |----xx_table1.c
|
|----platform_inc
- |----xx_platform_cfg.h
+ |----xx_platform_cfg.h
The xx_app.h file is included in this layout only because table handles are
-typically stored in an application's AppData_t structure.
+typically stored in an application's AppData_t structure.
The file xx_tbldefs.h (sometimes just named xx_tbl.h) typically contains the
structure definition of a single table entry. This file is included in the
@@ -2798,7 +2796,7 @@ The xx_tbl.c file typically contains table-related utility functions. For
instance, many applications define table initialization and validation functions
in this file.
-The xx_table1.c file is the source code for a table itself.
+The xx_table1.c file is the source code for a table itself.
The xx_platform_cfg.h file contains configuration parameters for applications,
and there are typically several configuration parameters associated with tables.
@@ -2896,7 +2894,7 @@ int32 XX_ValidateTable(void *TableData)
{
/* validate each entry of the table */
...
- }
+ }
...
return Status;
@@ -2939,7 +2937,7 @@ FILE: xx_platform_cfg.h
#define XX_TABLE_ENTRY_COUNT 3
```
-## 8.6 Building Tables
+## 8.6 Building Tables
In order to build application tables with the CMake build system, the
"add_cfe_tables" command needs to be added to the CMakeLists.txt file. If the
diff --git a/docs/src/cfe_api.dox b/docs/src/cfe_api.dox
index 6d0cd4bdc..85f5f896d 100644
--- a/docs/src/cfe_api.dox
+++ b/docs/src/cfe_api.dox
@@ -15,7 +15,6 @@
\ref CFEAPIESAppBehavior
- - #CFE_ES_RegisterApp - \copybrief CFE_ES_RegisterApp
- #CFE_ES_RunLoop - \copybrief CFE_ES_RunLoop
- #CFE_ES_WaitForStartupSync - \copybrief CFE_ES_WaitForStartupSync
- #CFE_ES_WaitForSystemState - \copybrief CFE_ES_WaitForSystemState
@@ -33,7 +32,6 @@
\ref CFEAPIESChildTask
- - #CFE_ES_RegisterChildTask - \copybrief CFE_ES_RegisterChildTask
- #CFE_ES_CreateChildTask - \copybrief CFE_ES_CreateChildTask
- #CFE_ES_DeleteChildTask - \copybrief CFE_ES_DeleteChildTask
- #CFE_ES_ExitChildTask - \copybrief CFE_ES_ExitChildTask
diff --git a/modules/cfe_testrunner/src/cfe_testrunner_main.c b/modules/cfe_testrunner/src/cfe_testrunner_main.c
index bd0c32416..e9cd9c32d 100644
--- a/modules/cfe_testrunner/src/cfe_testrunner_main.c
+++ b/modules/cfe_testrunner/src/cfe_testrunner_main.c
@@ -64,16 +64,6 @@ void CFE_TestRunner_AppMain(void)
int32 rc;
uint32 RunStatus;
- /*
- ** Register the app with Executive services
- */
- rc = CFE_ES_RegisterApp();
- if (rc != CFE_SUCCESS)
- {
- CFE_ES_WriteToSysLog("Error in CFE_ES_RegisterApp(): %08lx\n", (unsigned long)rc);
- return;
- }
-
/*
* Delay until the system reaches "operational" state -- this is when all libs have initialized
* and all apps have reached their RunLoop.
diff --git a/modules/core_api/fsw/inc/cfe_error.h b/modules/core_api/fsw/inc/cfe_error.h
index d637a2f23..a578bf432 100644
--- a/modules/core_api/fsw/inc/cfe_error.h
+++ b/modules/core_api/fsw/inc/cfe_error.h
@@ -433,7 +433,7 @@ typedef int32 CFE_Status_t;
/**
* @brief Application Register Error
*
- * Occurs when the #CFE_ES_RegisterApp fails.
+ * Occurs when a task cannot be registered in ES global tables
*
*/
#define CFE_ES_ERR_APP_REGISTER ((CFE_Status_t)0xc4000017)
@@ -945,9 +945,6 @@ typedef int32 CFE_Status_t;
* @brief Bad Application ID
*
* The calling application does not have a legitimate Application ID.
- * Most likely cause is a failure to register with the cFE via the
- * #CFE_ES_RegisterApp function.
- *
*/
#define CFE_TBL_ERR_BAD_APP_ID ((CFE_Status_t)0xcc00000A)
diff --git a/modules/core_api/fsw/inc/cfe_es.h b/modules/core_api/fsw/inc/cfe_es.h
index 9ac478f0a..a9b861239 100644
--- a/modules/core_api/fsw/inc/cfe_es.h
+++ b/modules/core_api/fsw/inc/cfe_es.h
@@ -340,7 +340,8 @@ CFE_Status_t CFE_ES_DeleteApp(CFE_ES_AppId_t AppID);
** \arg #CFE_ES_RunStatus_CORE_APP_INIT_ERROR - \copybrief CFE_ES_RunStatus_CORE_APP_INIT_ERROR
** \arg #CFE_ES_RunStatus_CORE_APP_RUNTIME_ERROR - \copybrief CFE_ES_RunStatus_CORE_APP_RUNTIME_ERROR
**
-** \sa #CFE_ES_RunLoop, #CFE_ES_RegisterApp
+**
+** \sa #CFE_ES_RunLoop
**
******************************************************************************/
void CFE_ES_ExitApp(uint32 ExitStatus);
@@ -366,7 +367,7 @@ void CFE_ES_ExitApp(uint32 ExitStatus);
** \retval true Application should continue running
** \retval false Application should not continue running
**
-** \sa #CFE_ES_ExitApp, #CFE_ES_RegisterApp
+** \sa #CFE_ES_ExitApp
**
******************************************************************************/
bool CFE_ES_RunLoop(uint32 *ExitStatus);
@@ -434,23 +435,6 @@ CFE_Status_t CFE_ES_WaitForSystemState(uint32 MinSystemState, uint32 TimeOutMill
******************************************************************************/
void CFE_ES_WaitForStartupSync(uint32 TimeOutMilliseconds);
-/*****************************************************************************/
-/**
-** \brief Registers a cFE Application with the Executive Services
-**
-** \par Description
-** This API registers the calling Application with the cFE.
-**
-** \par Assumptions, External Events, and Notes:
-** NOTE: This function \b MUST be called before any other cFE API functions are called.
-**
-** \return Execution status, see \ref CFEReturnCodes
-**
-** \sa #CFE_ES_ExitApp, #CFE_ES_RunLoop
-**
-******************************************************************************/
-CFE_Status_t CFE_ES_RegisterApp(void);
-
/*****************************************************************************/
/**
** \ingroup CFEAPIESAppBehavior
@@ -780,26 +764,6 @@ int32 CFE_ES_GetModuleInfo(CFE_ES_AppInfo_t *ModuleInfo, CFE_ResourceId_t Resour
* @{
*/
-/*****************************************************************************/
-/**
-** \brief Registers a cFE Child task associated with a cFE Application
-**
-** \par Description
-** This routine registers a cFE Child task and associates it with its parent
-** cFE Application.
-**
-** \par Assumptions, External Events, and Notes:
-** NOTE: This API \b MUST be called by the Child Task before any other cFE API calls are made.
-**
-** \return Execution status, see \ref CFEReturnCodes
-** \retval #CFE_SUCCESS \copybrief CFE_SUCCESS
-** \retval #CFE_ES_ERR_CHILD_TASK_REGISTER \copybrief CFE_ES_ERR_CHILD_TASK_REGISTER
-**
-** \sa #CFE_ES_CreateChildTask, #CFE_ES_DeleteChildTask, #CFE_ES_ExitChildTask
-**
-******************************************************************************/
-CFE_Status_t CFE_ES_RegisterChildTask(void);
-
/*****************************************************************************/
/**
** \brief Creates a new task under an existing Application
@@ -837,7 +801,7 @@ CFE_Status_t CFE_ES_RegisterChildTask(void);
** \retval #CFE_SUCCESS \copybrief CFE_SUCCESS
** \retval #CFE_ES_ERR_CHILD_TASK_CREATE \copybrief CFE_ES_ERR_CHILD_TASK_CREATE
**
-** \sa #CFE_ES_RegisterChildTask, #CFE_ES_DeleteChildTask, #CFE_ES_ExitChildTask
+** \sa #CFE_ES_DeleteChildTask, #CFE_ES_ExitChildTask
**
******************************************************************************/
CFE_Status_t CFE_ES_CreateChildTask(CFE_ES_TaskId_t *TaskIdPtr, const char *TaskName,
@@ -915,7 +879,7 @@ CFE_Status_t CFE_ES_GetTaskName(char *TaskName, CFE_ES_TaskId_t TaskId, size_t B
** \retval #CFE_SUCCESS \copybrief CFE_SUCCESS
** \retval #CFE_ES_NOT_IMPLEMENTED \copybrief CFE_ES_NOT_IMPLEMENTED
**
-** \sa #CFE_ES_RegisterChildTask, #CFE_ES_CreateChildTask, #CFE_ES_ExitChildTask
+** \sa #CFE_ES_CreateChildTask, #CFE_ES_ExitChildTask
**
******************************************************************************/
CFE_Status_t CFE_ES_DeleteChildTask(CFE_ES_TaskId_t TaskId);
@@ -935,7 +899,7 @@ CFE_Status_t CFE_ES_DeleteChildTask(CFE_ES_TaskId_t TaskId);
** at all, it is assumed that the Task was either unregistered or
** this function was called from a cFE Application's main task.
**
-** \sa #CFE_ES_RegisterChildTask, #CFE_ES_CreateChildTask, #CFE_ES_DeleteChildTask
+** \sa #CFE_ES_CreateChildTask, #CFE_ES_DeleteChildTask
**
******************************************************************************/
void CFE_ES_ExitChildTask(void);
diff --git a/modules/core_api/ut-stubs/src/ut_es_stubs.c b/modules/core_api/ut-stubs/src/ut_es_stubs.c
index fcc138573..21c70c26c 100644
--- a/modules/core_api/ut-stubs/src/ut_es_stubs.c
+++ b/modules/core_api/ut-stubs/src/ut_es_stubs.c
@@ -346,59 +346,6 @@ CFE_Status_t CFE_ES_GetAppName(char *AppName, CFE_ES_AppId_t AppId, size_t Buffe
return status;
}
-/*****************************************************************************/
-/**
-** \brief CFE_ES_RegisterApp stub function
-**
-** \par Description
-** This function is used to mimic the response of the cFE ES function
-** CFE_ES_RegisterApp. The user can adjust the response by setting
-** the values in the ES_RegisterRtn structure prior to this function
-** being called. If the value ES_RegisterRtn.count is greater than
-** zero then the counter is decremented; if it then equals zero the
-** return value is set to the user-defined value ES_RegisterRtn.value.
-** CFE_SUCCESS is returned otherwise.
-**
-** \par Assumptions, External Events, and Notes:
-** None
-**
-** \returns
-** Returns either a user-defined status flag or CFE_SUCCESS.
-**
-******************************************************************************/
-int32 CFE_ES_RegisterApp(void)
-{
- int32 status;
-
- status = UT_DEFAULT_IMPL(CFE_ES_RegisterApp);
-
- return status;
-}
-
-/*****************************************************************************/
-/**
-** \brief CFE_ES_RegisterChildTask stub function
-**
-** \par Description
-** This function is used to mimic the response of the cFE ES function
-** CFE_ES_RegisterChildTask. It always returns CFE_SUCCESS when called.
-**
-** \par Assumptions, External Events, and Notes:
-** None
-**
-** \returns
-** Returns CFE_SUCCESS.
-**
-******************************************************************************/
-int32 CFE_ES_RegisterChildTask(void)
-{
- int32 status = CFE_SUCCESS;
-
- status = UT_DEFAULT_IMPL(CFE_ES_RegisterChildTask);
-
- return status;
-}
-
/*****************************************************************************/
/**
** \brief CFE_ES_WriteToSysLog stub function
diff --git a/modules/core_private/ut-stubs/inc/ut_osprintf_stubs.h b/modules/core_private/ut-stubs/inc/ut_osprintf_stubs.h
index 58528ceb2..d0bf231f9 100644
--- a/modules/core_private/ut-stubs/inc/ut_osprintf_stubs.h
+++ b/modules/core_private/ut-stubs/inc/ut_osprintf_stubs.h
@@ -68,7 +68,6 @@
#define UT_OSP_ES_APP_STARTUP_OPEN 39
#define UT_OSP_COMMAND_PIPE 40
#define UT_OSP_APP_INIT 41
-#define UT_OSP_REGISTER_APP 42
#define UT_OSP_SHARED_LIBRARY_INIT 43
#define UT_OSP_DECOMPRESS_LIBRARY 44
#define UT_OSP_EXTRACT_FILENAME_CF 45
@@ -96,7 +95,6 @@
#define UT_OSP_STARTUP_SYNC_FAIL_2 67
#define UT_OSP_MODULE_UNLOAD_FAILED 68
#define UT_OSP_TASKEXIT_BAD_CONTEXT 69
-#define UT_OSP_BACKGROUND_REGISTER 70
#define UT_OSP_BACKGROUND_TAKE 71
#endif /* UT_OSPRINTF_STUBS_H */
diff --git a/modules/core_private/ut-stubs/src/ut_osprintf_stubs.c b/modules/core_private/ut-stubs/src/ut_osprintf_stubs.c
index 452cbb498..dcf28a370 100644
--- a/modules/core_private/ut-stubs/src/ut_osprintf_stubs.c
+++ b/modules/core_private/ut-stubs/src/ut_osprintf_stubs.c
@@ -46,8 +46,6 @@ const char *UT_OSP_MESSAGES[] = {
[UT_OSP_MOUNT_VOLATILE] = "ES Startup: Error Mounting Volatile(RAM) Volume. EC = 0x%08X\n",
/* CFE_ES_ExitApp: CORE Application CFE_ES Had a Runtime Error. */
[UT_OSP_CORE_RUNTIME] = "CFE_ES_ExitApp: CORE Application %s Had a Runtime Error.\n",
- /* ES:Call to CFE_ES_RegisterApp Failed, RC = 0x~ */
- [UT_OSP_REGISTER_APP] = "ES:Call to CFE_ES_RegisterApp Failed, RC = 0x%08X\n",
/* ES Startup: OS_TaskCreate error creating core App: CFE_TBL: EC = 0x~ */
[UT_OSP_CORE_APP_CREATE] = "ES Startup: OS_TaskCreate error creating core App: %s: EC = 0x%08X\n",
/* ES Startup: Error returned when calling function: CFE_TBL_EarlyInit: EC = 0x~ */
@@ -161,6 +159,5 @@ const char *UT_OSP_MESSAGES[] = {
[UT_OSP_RECORD_USED] = "ES Startup: Error: ES_TaskTable slot for ID %lx in use at task creation!\n",
/* CFE_ES_ExitChildTask called from invalid task context */
[UT_OSP_TASKEXIT_BAD_CONTEXT] = "CFE_ES_ExitChildTask called from invalid task context\n",
- [UT_OSP_BACKGROUND_REGISTER] = "CFE_ES: Background Task Failed to register: %08lx\n",
[UT_OSP_BACKGROUND_TAKE] = "CFE_ES: Failed to take background sem: %08lx\n",
};
diff --git a/modules/es/fsw/src/cfe_es_api.c b/modules/es/fsw/src/cfe_es_api.c
index 78f9a6491..aadd7d0c1 100644
--- a/modules/es/fsw/src/cfe_es_api.c
+++ b/modules/es/fsw/src/cfe_es_api.c
@@ -639,44 +639,6 @@ void CFE_ES_WaitForStartupSync(uint32 TimeOutMilliseconds)
CFE_ES_WaitForSystemState(CFE_ES_SystemState_OPERATIONAL, TimeOutMilliseconds);
}
-/*
-** Function: - See API and header file for details
-*/
-int32 CFE_ES_RegisterApp(void)
-{
- int32 Result;
-
- CFE_ES_LockSharedData(__func__, __LINE__);
-
- /*
- ** Register the task
- */
- Result = OS_TaskRegister();
-
- if (Result == OS_SUCCESS)
- {
- Result = CFE_SUCCESS;
- }
- else
- {
- /*
- ** Cannot create a syslog entry here because it requires the task to
- ** be registered
- */
- Result = CFE_ES_ERR_APP_REGISTER;
- }
-
- /*
- ** Set the default exception environment
- */
- CFE_PSP_SetDefaultExceptionEnvironment();
-
- CFE_ES_UnlockSharedData(__func__, __LINE__);
-
- return (Result);
-
-} /* End of CFE_ES_RegisterApp() */
-
/*
** Function: CFE_ES_GetAppIDByName - See API and header file for details
*/
@@ -1296,45 +1258,6 @@ int32 CFE_ES_CreateChildTask(CFE_ES_TaskId_t *TaskIdPtr, const char *TaskName,
} /* End of CFE_ES_CreateChildTask() */
-/*
-** Function: CFE_ES_RegisterChildTask - See API and header file for details
-*/
-int32 CFE_ES_RegisterChildTask(void)
-{
- int32 Result;
- int32 ReturnCode;
-
- CFE_ES_LockSharedData(__func__, __LINE__);
-
- /*
- ** Register the task with the OS
- */
- Result = OS_TaskRegister();
-
- if (Result != OS_SUCCESS)
- {
- /*
- ** Cannot create a syslog entry here because it requires the task to
- ** be registered
- */
- ReturnCode = CFE_ES_ERR_CHILD_TASK_REGISTER;
- }
- else
- {
- ReturnCode = CFE_SUCCESS;
- }
-
- /*
- ** Set the default exception environment
- */
- CFE_PSP_SetDefaultExceptionEnvironment();
-
- CFE_ES_UnlockSharedData(__func__, __LINE__);
-
- return (ReturnCode);
-
-} /* End of CFE_ES_RegisterChildTask() */
-
/*
** Function: CFE_ES_IncrementTaskCounter - See API and header file for details
*/
diff --git a/modules/es/fsw/src/cfe_es_apps.c b/modules/es/fsw/src/cfe_es_apps.c
index 012e7458c..8109e69ba 100644
--- a/modules/es/fsw/src/cfe_es_apps.c
+++ b/modules/es/fsw/src/cfe_es_apps.c
@@ -551,6 +551,18 @@ void CFE_ES_TaskEntryPoint(void)
if (CFE_ES_GetTaskFunction(&RealEntryFunc) == CFE_SUCCESS && RealEntryFunc != NULL)
{
+ /*
+ * Set the default exception environment, which should
+ * be done serialized (i.e. only one task at a time should
+ * call into CFE_PSP_SetDefaultExceptionEnvironment).
+ */
+ CFE_ES_LockSharedData(__func__, __LINE__);
+ CFE_PSP_SetDefaultExceptionEnvironment();
+ CFE_ES_UnlockSharedData(__func__, __LINE__);
+
+ /*
+ * Call the actual task entry function
+ */
(*RealEntryFunc)();
}
}
@@ -563,8 +575,8 @@ void CFE_ES_TaskEntryPoint(void)
**
** Note that OSAL does not separate the action of creating and start a task, providing
** only OS_TaskCreate which does both. But there is a potential race condition if
-** the real task code starts and calls e.g. CFE_ES_RegisterApp() or any other function
-** that depends on having an AppID context, before its fully registered in the global app table.
+** the real task code starts and calls any function that depends on having an AppID
+** context before its fully registered in the global app table.
**
** Therefore this calls a dedicated CFE_ES_AppEntryPoint which then will wait until
** the task is fully registered in the global, before calling the actual app entry point.
diff --git a/modules/es/fsw/src/cfe_es_backgroundtask.c b/modules/es/fsw/src/cfe_es_backgroundtask.c
index 6410005db..df6581d37 100644
--- a/modules/es/fsw/src/cfe_es_backgroundtask.c
+++ b/modules/es/fsw/src/cfe_es_backgroundtask.c
@@ -111,14 +111,6 @@ void CFE_ES_BackgroundTask(void)
OS_time_t LastTime;
const CFE_ES_BackgroundJobEntry_t *JobPtr;
- status = CFE_ES_RegisterChildTask();
- if (status != CFE_SUCCESS)
- {
- /* should never occur */
- CFE_ES_WriteToSysLog("CFE_ES: Background Task Failed to register: %08lx\n", (unsigned long)status);
- return;
- }
-
CFE_PSP_GetTime(&LastTime);
while (true)
diff --git a/modules/es/fsw/src/cfe_es_task.c b/modules/es/fsw/src/cfe_es_task.c
index 4f12b123c..e024a1e83 100644
--- a/modules/es/fsw/src/cfe_es_task.c
+++ b/modules/es/fsw/src/cfe_es_task.c
@@ -339,16 +339,6 @@ int32 CFE_ES_TaskInit(void)
uint32 SizeofCfeSegment;
cpuaddr CfeSegmentAddr;
- /*
- ** Register the Application
- */
- Status = CFE_ES_RegisterApp();
- if (Status != CFE_SUCCESS)
- {
- CFE_ES_WriteToSysLog("ES:Call to CFE_ES_RegisterApp Failed, RC = 0x%08X\n", (unsigned int)Status);
- return (Status);
- }
-
/*
** Initialize task command execution counters
*/
diff --git a/modules/es/ut-coverage/es_UT.c b/modules/es/ut-coverage/es_UT.c
index 67e48dc4f..6e28b8216 100644
--- a/modules/es/ut-coverage/es_UT.c
+++ b/modules/es/ut-coverage/es_UT.c
@@ -2199,15 +2199,6 @@ void TestTask(void)
UT_Report(__FILE__, __LINE__, UT_PrintfIsInHistory(UT_OSP_MESSAGES[UT_OSP_COMMAND_PIPE]), "CFE_ES_TaskMain",
"Command pipe error, UT_OSP_COMMAND_PIPE message");
- /* Test task main process loop with an initialization failure */
- ES_ResetUnitTest();
- UT_SetDefaultReturnValue(UT_KEY(OS_TaskRegister), OS_ERROR);
- CFE_ES_TaskMain();
- UT_Report(__FILE__, __LINE__, UT_PrintfIsInHistory(UT_OSP_MESSAGES[UT_OSP_APP_INIT]), "CFE_ES_TaskMain",
- "Task initialization fail, UT_OSP_APP_INIT message");
- UT_Report(__FILE__, __LINE__, UT_PrintfIsInHistory(UT_OSP_MESSAGES[UT_OSP_REGISTER_APP]), "CFE_ES_TaskMain",
- "Task initialization fail, UT_OSP_REGISTER_APP message");
-
/* Test task main process loop with bad checksum information */
ES_ResetUnitTest();
UT_SetDeferredRetcode(UT_KEY(CFE_PSP_GetCFETextSegmentInfo), 1, -1);
@@ -2236,12 +2227,6 @@ void TestTask(void)
CFE_ES_TaskInit() == CFE_SUCCESS && CFE_ES_TaskData.HkPacket.Payload.CFECoreChecksum != 0xFFFF,
"CFE_ES_TaskInit", "Checksum success, PR Path");
- /* Test task main process loop with a register app failure */
- ES_ResetUnitTest();
- UT_SetDefaultReturnValue(UT_KEY(OS_TaskRegister), OS_ERROR);
- UT_Report(__FILE__, __LINE__, CFE_ES_TaskInit() == CFE_ES_ERR_APP_REGISTER, "CFE_ES_TaskInit",
- "Register application fail");
-
/* Test task main process loop with a with an EVS register failure */
ES_ResetUnitTest();
UT_SetDeferredRetcode(UT_KEY(CFE_EVS_Register), 1, -1);
@@ -3767,11 +3752,6 @@ void TestAPI(void)
CFE_ES_RunLoop(&RunStatus) == true && UtAppRecPtr->AppState == CFE_ES_AppState_RUNNING, "CFE_ES_RunLoop",
"Status change from initializing to run");
- /* Test successful CFE application registration */
- ES_ResetUnitTest();
- UT_Report(__FILE__, __LINE__, CFE_ES_RegisterApp() == CFE_SUCCESS, "CFE_ES_RegisterApp",
- "Application registration successful");
-
/* Test getting the cFE application and task ID by context */
ES_ResetUnitTest();
ES_UT_SetupSingleAppId(CFE_ES_AppType_EXTERNAL, CFE_ES_AppState_RUNNING, "UT", NULL, NULL);
@@ -3981,17 +3961,6 @@ void TestAPI(void)
UT_Report(__FILE__, __LINE__, UT_PrintfIsInHistory(UT_OSP_MESSAGES[UT_OSP_TASKEXIT_BAD_CONTEXT]),
"CFE_ES_ExitChildTask", "Invalid context");
- /* Test registering a child task with an OS task register failure */
- ES_ResetUnitTest();
- UT_SetDefaultReturnValue(UT_KEY(OS_TaskRegister), OS_ERROR);
- UT_Report(__FILE__, __LINE__, CFE_ES_RegisterChildTask() == CFE_ES_ERR_CHILD_TASK_REGISTER,
- "CFE_ES_RegisterChildTask", "OS task register failed");
-
- /* Test successfully registering a child task */
- ES_ResetUnitTest();
- UT_Report(__FILE__, __LINE__, CFE_ES_RegisterChildTask() == CFE_SUCCESS, "CFE_ES_RegisterChildTask",
- "Register child task successful");
-
/* Test successfully adding a time-stamped message to the system log that
* must be truncated
*/
@@ -5287,15 +5256,6 @@ void TestBackground(void)
CFE_ES_BackgroundCleanup();
UtAssert_True(UT_GetStubCount(UT_KEY(OS_BinSemDelete)) == 1, "CFE_ES_BackgroundCleanup - OS_BinSemDelete called");
- /*
- * Test background task loop function
- */
- ES_ResetUnitTest();
- UT_SetDeferredRetcode(UT_KEY(OS_TaskRegister), 1, -1);
- CFE_ES_BackgroundTask();
- UT_Report(__FILE__, __LINE__, UT_PrintfIsInHistory(UT_OSP_MESSAGES[UT_OSP_BACKGROUND_REGISTER]),
- "CFE_ES_BackgroundTask", "Failed to register error");
-
/*
* When testing the background task loop, it is normally an infinite loop,
* so this is needed to set a condition for the loop to exit.
diff --git a/modules/evs/fsw/src/cfe_evs_task.c b/modules/evs/fsw/src/cfe_evs_task.c
index 1a9e16cf9..80884ad14 100644
--- a/modules/evs/fsw/src/cfe_evs_task.c
+++ b/modules/evs/fsw/src/cfe_evs_task.c
@@ -277,14 +277,6 @@ int32 CFE_EVS_TaskInit(void)
int32 Status;
CFE_ES_AppId_t AppID;
- /* Register EVS application */
- Status = CFE_ES_RegisterApp();
- if (Status != CFE_SUCCESS)
- {
- CFE_ES_WriteToSysLog("EVS:Call to CFE_ES_RegisterApp Failed:RC=0x%08X\n", (unsigned int)Status);
- return Status;
- }
-
/* Query and verify the AppID */
Status = CFE_ES_GetAppID(&AppID);
if (Status != CFE_SUCCESS)
diff --git a/modules/evs/ut-coverage/evs_UT.c b/modules/evs/ut-coverage/evs_UT.c
index d863302a4..496742bbe 100644
--- a/modules/evs/ut-coverage/evs_UT.c
+++ b/modules/evs/ut-coverage/evs_UT.c
@@ -50,7 +50,7 @@ static const char *EVS_SYSLOG_MSGS[] = {
"Event Log restored, n=%d, c=%d, f=%d, m=%d, o=%d\n",
"EVS:Application Init Failed,RC=0x%08X\n",
"EVS:Error reading cmd pipe,RC=0x%08X\n",
- "EVS:Call to CFE_ES_RegisterApp Failed:RC=0x%08X\n",
+ NULL, /* old message removed - placeholder to maintain indices */
"EVS:Call to CFE_ES_GetAppID Failed:RC=0x%08X\n",
"EVS:Call to CFE_EVS_Register Failed:RC=0x%08X\n",
"EVS:Call to CFE_SB_CreatePipe Failed:RC=0x%08X\n",
@@ -248,14 +248,6 @@ void Test_Init(void)
ASSERT_TRUE(UT_SyslogIsInHistory(EVS_SYSLOG_MSGS[8]));
ASSERT_EQ(UT_EVS_EventBuf.EventID, CFE_EVS_ERR_MSGID_EID);
- /* Test TaskMain with a register application failure */
- UT_InitData();
- UT_SetDeferredRetcode(UT_KEY(CFE_ES_RegisterApp), 1, -1);
- CFE_EVS_TaskMain();
- UT_Report(__FILE__, __LINE__,
- UT_SyslogIsInHistory(EVS_SYSLOG_MSGS[7]) && UT_GetStubCount(UT_KEY(CFE_ES_WriteToSysLog)) == 2,
- "CFE_EVS_TaskMain", "Application initialization failure");
-
/* Test early initialization with a get reset area failure */
UT_InitData();
UT_SetStatusBSPResetArea(-1, CFE_TIME_RESET_SIGNATURE, CFE_TIME_ToneSignalSelect_PRIMARY);
@@ -325,13 +317,6 @@ void Test_Init(void)
UT_Report(__FILE__, __LINE__, UT_SyslogIsInHistory(EVS_SYSLOG_MSGS[4]), "CFE_EVS_EarlyInit",
"Early initialization successful");
- /* Test task initialization where the application registration fails */
- UT_InitData();
- UT_SetDeferredRetcode(UT_KEY(CFE_ES_RegisterApp), 1, -1);
- CFE_EVS_TaskInit();
- UT_Report(__FILE__, __LINE__, UT_SyslogIsInHistory(EVS_SYSLOG_MSGS[9]), "CFE_EVS_TaskInit",
- "Call to CFE_ES_RegisterApp failure");
-
/* Test task initialization where event services fails */
UT_InitData();
UT_SetDeferredRetcode(UT_KEY(CFE_ES_GetAppID), 2, -1); /* Set Failure in CFE_EVS_Register -> EVS_GetApp_ID */
diff --git a/modules/sb/fsw/src/cfe_sb_task.c b/modules/sb/fsw/src/cfe_sb_task.c
index cccd017eb..567521a00 100644
--- a/modules/sb/fsw/src/cfe_sb_task.c
+++ b/modules/sb/fsw/src/cfe_sb_task.c
@@ -138,14 +138,6 @@ int32 CFE_SB_AppInit(void)
CFE_ES_MemPoolBuf_t TmpPtr;
int32 Status;
- Status = CFE_ES_RegisterApp();
-
- if (Status != CFE_SUCCESS)
- {
- CFE_ES_WriteToSysLog("SB:Call to CFE_ES_RegisterApp Failed:RC=0x%08X\n", (unsigned int)Status);
- return Status;
- } /* end if */
-
/* Get the assigned Application ID for the SB Task */
CFE_ES_GetAppID(&CFE_SB_Global.AppId);
diff --git a/modules/sb/ut-coverage/sb_UT.c b/modules/sb/ut-coverage/sb_UT.c
index 76d530570..82bcfa0c1 100644
--- a/modules/sb/ut-coverage/sb_UT.c
+++ b/modules/sb/ut-coverage/sb_UT.c
@@ -184,7 +184,6 @@ void SB_ResetUnitTest(void)
*/
void Test_SB_AppInit(void)
{
- SB_UT_ADD_SUBTEST(Test_SB_AppInit_ESRegFail);
SB_UT_ADD_SUBTEST(Test_SB_AppInit_EVSRegFail);
SB_UT_ADD_SUBTEST(Test_SB_AppInit_EVSSendEvtFail);
SB_UT_ADD_SUBTEST(Test_SB_AppInit_CrPipeFail);
@@ -194,20 +193,6 @@ void Test_SB_AppInit(void)
SB_UT_ADD_SUBTEST(Test_SB_AppInit_PutPoolFail);
} /* end Test_SB_AppInit */
-/*
-** Test task init with ES_RegisterApp returning error
-*/
-void Test_SB_AppInit_ESRegFail(void)
-{
- int32 ForcedRtnVal = -1;
-
- UT_SetDeferredRetcode(UT_KEY(CFE_ES_RegisterApp), 1, ForcedRtnVal);
- ASSERT_EQ(CFE_SB_AppInit(), ForcedRtnVal);
-
- EVTCNT(0);
-
-} /* end Test_SB_AppInit_ESRegFail */
-
/*
** Test task init with EVS_Register returning error
*/
diff --git a/modules/sb/ut-coverage/sb_UT.h b/modules/sb/ut-coverage/sb_UT.h
index 4aa09e201..0efbcba51 100644
--- a/modules/sb/ut-coverage/sb_UT.h
+++ b/modules/sb/ut-coverage/sb_UT.h
@@ -133,21 +133,6 @@ void Test_SB_App(void);
******************************************************************************/
void Test_SB_AppInit(void);
-/*****************************************************************************/
-/**
-** \brief Test task init with ES_RegisterApp returning error
-**
-** \par Description
-** This function tests task init with ES_RegisterApp returning error.
-**
-** \par Assumptions, External Events, and Notes:
-** None
-**
-** \returns
-** This function does not return a value.
-******************************************************************************/
-void Test_SB_AppInit_ESRegFail(void);
-
/*****************************************************************************/
/**
** \brief Test task init with EVS_Register returning error
diff --git a/modules/tbl/fsw/src/cfe_tbl_task.c b/modules/tbl/fsw/src/cfe_tbl_task.c
index 72a3dca1d..ee8356922 100644
--- a/modules/tbl/fsw/src/cfe_tbl_task.c
+++ b/modules/tbl/fsw/src/cfe_tbl_task.c
@@ -146,17 +146,6 @@ int32 CFE_TBL_TaskInit(void)
{
int32 Status;
- /*
- ** Register Table Services with ES
- */
- Status = CFE_ES_RegisterApp();
-
- if (Status != CFE_SUCCESS)
- {
- CFE_ES_WriteToSysLog("TBL:Call to CFE_ES_RegisterApp Failed:RC=0x%08X\n", (unsigned int)Status);
- return Status;
- } /* end if */
-
/*
** Initialize global Table Services data
*/
diff --git a/modules/tbl/ut-coverage/tbl_UT.c b/modules/tbl/ut-coverage/tbl_UT.c
index 9f8921246..cad347f59 100644
--- a/modules/tbl/ut-coverage/tbl_UT.c
+++ b/modules/tbl/ut-coverage/tbl_UT.c
@@ -239,18 +239,6 @@ void Test_CFE_TBL_TaskInit(void)
ExitCode == CFE_ES_RunStatus_CORE_APP_RUNTIME_ERROR && UT_GetStubCount(UT_KEY(CFE_ES_ExitApp)) == 1,
"CFE_TBL_TaskMain", "Success");
- /* Test table services main entry point execution with a register
- * application failure
- */
- UT_InitData();
- UT_SetDeferredRetcode(UT_KEY(CFE_ES_RegisterApp), 1, -1);
- ExitCode = 0;
- UT_SetDataBuffer(UT_KEY(CFE_ES_ExitApp), &ExitCode, sizeof(ExitCode), false);
- CFE_TBL_TaskMain();
- UT_Report(__FILE__, __LINE__,
- ExitCode == CFE_ES_RunStatus_CORE_APP_INIT_ERROR && UT_GetStubCount(UT_KEY(CFE_ES_ExitApp)) == 2,
- "CFE_TBL_TaskMain", "Application register fail");
-
/* Test successful table services core application initialization */
UT_InitData();
UT_Report(__FILE__, __LINE__, CFE_TBL_TaskInit() == CFE_SUCCESS, "CFE_TBL_TaskInit", "Success");
diff --git a/modules/time/fsw/src/cfe_time_task.c b/modules/time/fsw/src/cfe_time_task.c
index e535be358..5994e31b7 100644
--- a/modules/time/fsw/src/cfe_time_task.c
+++ b/modules/time/fsw/src/cfe_time_task.c
@@ -198,13 +198,6 @@ int32 CFE_TIME_TaskInit(void)
osal_id_t TimeBaseId;
osal_id_t TimerId;
- Status = CFE_ES_RegisterApp();
- if (Status != CFE_SUCCESS)
- {
- CFE_ES_WriteToSysLog("TIME:Call to CFE_ES_RegisterApp Failed:RC=0x%08X\n", (unsigned int)Status);
- return Status;
- } /* end if */
-
Status = CFE_EVS_Register(NULL, 0, 0);
if (Status != CFE_SUCCESS)
{
diff --git a/modules/time/fsw/src/cfe_time_tone.c b/modules/time/fsw/src/cfe_time_tone.c
index 671c8456f..d03de6225 100644
--- a/modules/time/fsw/src/cfe_time_tone.c
+++ b/modules/time/fsw/src/cfe_time_tone.c
@@ -1148,9 +1148,9 @@ void CFE_TIME_Tone1HzISR(void)
void CFE_TIME_Tone1HzTask(void)
{
- int32 Result = CFE_ES_RegisterChildTask();
+ int32 Result;
- while (Result == CFE_SUCCESS)
+ while (true)
{
/* Increment the Main task Execution Counter */
CFE_ES_IncrementTaskCounter();
@@ -1159,31 +1159,32 @@ void CFE_TIME_Tone1HzTask(void)
** Pend on semaphore given by tone ISR (above)...
*/
Result = OS_BinSemTake(CFE_TIME_Global.ToneSemaphore);
+ if (Result != OS_SUCCESS)
+ {
+ break;
+ }
/* Start Performance Monitoring */
CFE_ES_PerfLogEntry(CFE_MISSION_TIME_TONE1HZTASK_PERF_ID);
- if (Result == CFE_SUCCESS)
- {
- /*
- ** Send tone signal command packet...
- */
- CFE_SB_TransmitMsg(&CFE_TIME_Global.ToneSignalCmd.CmdHeader.Msg, false);
+ /*
+ ** Send tone signal command packet...
+ */
+ CFE_SB_TransmitMsg(&CFE_TIME_Global.ToneSignalCmd.CmdHeader.Msg, false);
#if (CFE_MISSION_TIME_CFG_FAKE_TONE == true)
- /*
- ** If we are simulating the tone signal, also generate the message
- ** to send the tone to other time clients.
- ** (this is done by scheduler in non-fake mode)
- */
- CFE_SB_TransmitMsg(&CFE_TIME_Global.ToneSendCmd.CmdHeader.Msg, false);
+ /*
+ ** If we are simulating the tone signal, also generate the message
+ ** to send the tone to other time clients.
+ ** (this is done by scheduler in non-fake mode)
+ */
+ CFE_SB_TransmitMsg(&CFE_TIME_Global.ToneSendCmd.CmdHeader.Msg, false);
#endif
- /*
- ** Maintain count of tone task wake-ups...
- */
- CFE_TIME_Global.ToneTaskCounter++;
- }
+ /*
+ ** Maintain count of tone task wake-ups...
+ */
+ CFE_TIME_Global.ToneTaskCounter++;
/* Exit performance monitoring */
CFE_ES_PerfLogExit(CFE_MISSION_TIME_TONE1HZTASK_PERF_ID);
@@ -1343,9 +1344,9 @@ void CFE_TIME_Local1HzISR(void)
void CFE_TIME_Local1HzTask(void)
{
- int32 Result = CFE_ES_RegisterChildTask();
+ int32 Result;
- while (Result == CFE_SUCCESS)
+ while (true)
{
/* Increment the Main task Execution Counter */
@@ -1355,31 +1356,32 @@ void CFE_TIME_Local1HzTask(void)
** Pend on the 1HZ semaphore (given by local 1Hz ISR)...
*/
Result = OS_BinSemTake(CFE_TIME_Global.LocalSemaphore);
+ if (Result != OS_SUCCESS)
+ {
+ break;
+ }
/* Start Performance Monitoring */
CFE_ES_PerfLogEntry(CFE_MISSION_TIME_LOCAL1HZTASK_PERF_ID);
- if (Result == CFE_SUCCESS)
+ /*
+ ** Send "info" event if we just started flywheel mode...
+ */
+ if (CFE_TIME_Global.AutoStartFly)
{
- /*
- ** Send "info" event if we just started flywheel mode...
- */
- if (CFE_TIME_Global.AutoStartFly)
- {
- CFE_TIME_Global.AutoStartFly = false;
+ CFE_TIME_Global.AutoStartFly = false;
- CFE_EVS_SendEvent(CFE_TIME_FLY_ON_EID, CFE_EVS_EventType_INFORMATION, "Start FLYWHEEL");
- }
+ CFE_EVS_SendEvent(CFE_TIME_FLY_ON_EID, CFE_EVS_EventType_INFORMATION, "Start FLYWHEEL");
+ }
- /*
- ** Send 1Hz timing packet...
- ** This used to be optional in previous CFE versions, but it is now required
- ** as TIME subscribes to this itself to do state machine tasks.
- */
- CFE_SB_TransmitMsg(&CFE_TIME_Global.Local1HzCmd.CmdHeader.Msg, false);
+ /*
+ ** Send 1Hz timing packet...
+ ** This used to be optional in previous CFE versions, but it is now required
+ ** as TIME subscribes to this itself to do state machine tasks.
+ */
+ CFE_SB_TransmitMsg(&CFE_TIME_Global.Local1HzCmd.CmdHeader.Msg, false);
- CFE_TIME_Global.LocalTaskCounter++;
- }
+ CFE_TIME_Global.LocalTaskCounter++;
/* Exit performance monitoring */
CFE_ES_PerfLogExit(CFE_MISSION_TIME_LOCAL1HZTASK_PERF_ID);
diff --git a/modules/time/ut-coverage/time_UT.c b/modules/time/ut-coverage/time_UT.c
index 42b8b412e..aac8c2d00 100644
--- a/modules/time/ut-coverage/time_UT.c
+++ b/modules/time/ut-coverage/time_UT.c
@@ -167,13 +167,6 @@ void Test_Main(void)
CFE_TIME_TaskMain();
UT_Report(__FILE__, __LINE__, UT_SyslogIsInHistory(TIME_SYSLOG_MSGS[1]), "CFE_TIME_TaskMain",
"Command pipe read error");
-
- /* Test with an application initialization failure */
- UT_InitData();
- UT_SetDeferredRetcode(UT_KEY(CFE_ES_RegisterApp), 1, -1);
- CFE_TIME_TaskMain();
- UT_Report(__FILE__, __LINE__, UT_SyslogIsInHistory(TIME_SYSLOG_MSGS[2]), "CFE_TIME_TaskMain",
- "Application initialization fail");
}
/*
@@ -211,11 +204,6 @@ void Test_Init(void)
UT_InitData();
UT_Report(__FILE__, __LINE__, CFE_TIME_TaskInit() == CFE_SUCCESS, "CFE_TIME_Task_Init", "Successful");
- /* Test response to a failure to register an application */
- UT_InitData();
- UT_SetDeferredRetcode(UT_KEY(CFE_ES_RegisterApp), 1, -1);
- UT_Report(__FILE__, __LINE__, CFE_TIME_TaskInit() == -1, "CFE_TIME_Task_Init", "Register application failure");
-
/* Test response to a failure creating the first child task */
UT_InitData();
UT_SetDeferredRetcode(UT_KEY(CFE_ES_CreateChildTask), 1, -1);