Fix #295 and #480, Resolve app table scanning race conditions#598
Merged
astrogeco merged 1 commit intonasa:integration-candidatefrom Apr 21, 2020
Merged
Conversation
Create a new background job to handle the maintenance tasks that had been performed in the ES main task as part of the CFE_ES_ScanAppTable() routine. All app state changes, including those invoked by messages, are now handled by this job. This also slightly changes the semantics of CFE_ES_RunLoop and CFE_ES_ExitApp. Now, the CFE_ES_RunLoop routine no longer requires a RunStatus buffer. Instead, the only thing that matters is the RunStatus value that is eventually passed to CFE_ES_ExitApp after the shutdown is complete. This should be mostly backward compatible, as the recommended app pattern would pass the same value to both functions. This commit also fixes nasa#480, as the value passed to CFE_ES_ExitApp will not override a request that was already pending.
93296e0 to
bf24986
Compare
Contributor
Author
|
Force-push: rebased to latest master branch |
skliper
approved these changes
Apr 10, 2020
ghost
approved these changes
Apr 10, 2020
ghost
left a comment
There was a problem hiding this comment.
Looks good. I like the background job design.
Contributor
|
CCB 20200415 - APPROVED |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe the contribution
Fixes #295
Fixes #480
Partially addresses #567 - runloop now increments task counter instead of main app execution counter
Create a new background job to handle the maintenance tasks that had been performed in the ES main task as part of the
CFE_ES_ScanAppTable()routine.All app state changes, including those invoked by messages, are now handled by this job.
This also slightly changes the semantics of CFE_ES_RunLoop and CFE_ES_ExitApp. Now, the CFE_ES_RunLoop routine no longer requires a RunStatus buffer. Instead, the only thing that matters is the RunStatus value that is eventually passed to CFE_ES_ExitApp after the shutdown is complete. This should be mostly backward compatible, as the recommended app pattern would pass the same value to both functions.
This commit also fixes #480, as the value passed to CFE_ES_ExitApp will not override a request that was already pending.
Testing performed
Build with ENABLE_UNIT_TESTS=TRUE for native (x86-64 Linux) and RTEMS (i686-rtems4.11)
Expected behavior changes
No impact to CMD/TLM interface or API. Internal changes only.
System(s) tested on
Additional context
This reuses the background task concept introduced in pull #595. Will rebase this changeset as soon as that pull request makes it into a stable baseline.
Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems Inc.