Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "foreach" function for access descriptor looping #2546

Closed
jphickey opened this issue Apr 4, 2024 · 0 comments · Fixed by #2548
Closed

Add "foreach" function for access descriptor looping #2546

jphickey opened this issue Apr 4, 2024 · 0 comments · Fixed by #2548
Assignees

Comments

@jphickey
Copy link
Contributor

jphickey commented Apr 4, 2024

Is your feature request related to a problem? Please describe.
The set of access descriptors that point to the same registry entry is maintained as a linked list.

The logic to iterate through this list is copied whenever a search or modification is done. This results in a lot of duplicated logic.

Describe the solution you'd like
Implement a generic "foreach" routine with a callback/helper function to consolidate this logic.

Additional context
Note that the registry lock should be held whenever this list is modified. In support of that goal, logic that touches this list should be consolidated, so the locking can be handled consistently. (In addition to general cleanup and simplification of code, etc)

Requester Info
Joseph Hickey, Vantage Systems, Inc.

@jphickey jphickey self-assigned this Apr 4, 2024
jphickey added a commit to jphickey/cFE that referenced this issue Apr 5, 2024
Adds a "HandleLink" structure to encapsulate the linked list
functionality and add generic routines to initialize and test/check
this structure, along with list insert/remove functions for
access descriptors that use this link struct interally.

This also cleans up documentation of the table resource ID functions
defined in cfe_tbl_resource.h
jphickey added a commit to jphickey/cFE that referenced this issue Apr 5, 2024
Adds a "HandleLink" structure to encapsulate the linked list
functionality and add generic routines to initialize and test/check
this structure, along with list insert/remove functions for
access descriptors that use this link struct interally.

This also cleans up documentation of the table resource ID functions
defined in cfe_tbl_resource.h
jphickey added a commit to jphickey/cFE that referenced this issue Apr 5, 2024
Adds a "HandleLink" structure to encapsulate the linked list
functionality and add generic routines to initialize and test/check
this structure, along with list insert/remove functions for
access descriptors that use this link struct interally.

This also cleans up documentation of the table resource ID functions
defined in cfe_tbl_resource.h
dzbaker added a commit that referenced this issue Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant