Fix #56, Refactor CDS to use generic pool implementation#939
Merged
astrogeco merged 1 commit intonasa:integration-candidatefrom Oct 13, 2020
Merged
Conversation
Rather than having a second pool implementation only for CDS, use the generic pool implementation. This also uses the abstract resource identifiers to identify CDS blocks, rather than a direct reference.
af4f72a to
daf6c04
Compare
Contributor
|
CCB 2020-10-06 APPROVED
|
astrogeco
added a commit
to nasa/cFS
that referenced
this pull request
Oct 13, 2020
ghost
reviewed
Oct 14, 2020
ghost
left a comment
There was a problem hiding this comment.
Looks good. I like the consolidation into a single memory pool implementation.
| return CFE_STATUS_EXTERNAL_RESOURCE_FAIL; | ||
| } | ||
|
|
||
| /* Get CDS size from OS BSP */ |
There was a problem hiding this comment.
Is it worth changing comment to "Get CFDS Size from PSP" ?
|
|
||
| /*******************************************************************/ | ||
| /* | ||
| * CFE_ES_LocateCDSBlockRecordByID |
|
|
||
| /*******************************************************************/ | ||
| /* | ||
| * CFE_ES_CacheRead() |
| @@ -559,16 +679,22 @@ void CFE_ES_FormCDSName(char *FullCDSName, const char *CDSName, CFE_ES_ResourceI | |||
| ** NOTE: For complete prolog information, see 'cfe_es_cds.h' | |||
| ********************************************************************/ | ||
|
|
||
| int32 CFE_ES_FindFreeCDSRegistryEntry(void) | ||
| CFE_ES_CDS_RegRec_t *CFE_ES_AllocateNewCDSRegistryEntry() |
There was a problem hiding this comment.
Should the function have (void) instead of ()?
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
Rather than having a second pool implementation only for CDS, use the generic pool implementation. This also uses the abstract resource identifiers to identify CDS blocks, rather than a direct reference.
Fixes #56
Testing performed
Build and sanity test CFE
Confirm all unit tests working
Also tested/Confirmed that the CFE TBL critical table registry is correctly restored when booting in a processor reset mode. In this case the data is successfully restored from CDS.
Expected behavior changes
No impact to behavior.
System(s) tested on
Ubuntu 20.04
Additional context
This consolidates and simplifies a bunch of code in the CDS access area.
Note that previously there was a separate mutex for the CDS pool and CDS registry. However almost all accesses needed both, because pool access and registry access go together. So this is simplified to one mutex now.
Contributor Info - All information REQUIRED for consideration of pull request
Joseph Hickey, Vantage Systems, Inc.