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

OSAL Integration Candidate: 2020-12-08 #680

Merged
merged 17 commits into from
Dec 9, 2020
Merged

Conversation

astrogeco
Copy link
Contributor

@astrogeco astrogeco commented Dec 9, 2020

Describe the contribution

Fix #120, Exit console loop on shutdown
Fix #290, Remove obsolete printf tests
Fix #608, Add RTEMS 5.x support
Fix #631, add new functional tests for OS_chmod
Fix #648, scrub array references in shared layer
Fix #648, rename internal fields for consistency
Fix #648, sanitize array refs on impl layer
Fix #649, use full object ID in timecb list
Fix #650, OS_chmod uses read or write access.
Fix #664, change type of sync callback argument to osal_id_t

Expected behavior changes

PR #661 - Add support for RTEMS 5.1. The change provides defines and necessary ifdefs so RTEMS 4.11 can continue to be supported.

PR #663 - OS_chmod now checks for either read or write access instead of just read access

PR #665 - Adds functional test for OS_chmod

PR #666 - Refactor the table array access across OSAL. Use a token concept in combination with a macro to obtain the table entry instead of indexing arrays directly. All access is then done through this table pointer. Use the full object ID in the timer call back list. Update the timer sync callback prototype. Pass the entire OSAL ID to the sync function, not just the index. This is technically an API change.

PR #667 - Replaces condition on forever loops to end on shutdown. Loops now exit on shutdown.

PR #674 - Removes obsolete printf tests that didn't work

Testing performed
See https://github.com/nasa/cFS/pull/160/checks

System(s) tested on
Ubuntu 18.04

Additional context
Part of nasa/cFS#160

Third party code
None

Contributor Info - All information REQUIRED for consideration of pull request
@skliper
@acudmore
@jphickey
@zanzaben

Alan Cudmore and others added 13 commits November 30, 2020 10:18
Introduce the OS_object_token_t type which tracks a reference
to an OSAL resource.  This contains all information about the
original reference, including the ID, object type, lock type, and
the table index.

Therefore, since the token type contains all relevant info, it
can be used in all places where a bare index was used.

This also considerably simplifies the code, as some functions
which previously output multiple objects only need to operate on
tokens, and the functions which called these functions only need
to instantiate a token.
Use a variable name that matches the type of resource being accessed,
rather than just "local".  In particular this is important for readability
of timecb and timebase code where functions need often need to access both
types of objects at the same time.  This also updates filesys code to match.
Pass token objects to impl layers to identify the object to operate
on, rather than the index.  The token has extra information including
the original/actual object ID - which matters if the ID might change
as part of the operation (e.g. new/delete).
For the linked list of timer callbacks, use the full object ID
value rather than just the index.  This ensures consistency
in the list and also makes it easier to manage.
ID is preferable to an array index because direct table access
should not be done outside OSAL itself.
Fix #650, OS_chmod uses read or write access.
Fix #648, 649, 664 - refactor all table array access
Fix #631, Add new functional tests for OS_chmod
@astrogeco astrogeco marked this pull request as ready for review December 9, 2020 19:53
@astrogeco astrogeco merged commit 9407cdf into main Dec 9, 2020
@skliper skliper added this to the 6.0.0 milestone Sep 24, 2021
jphickey pushed a commit to jphickey/osal that referenced this pull request Aug 10, 2022
jphickey pushed a commit to jphickey/osal that referenced this pull request Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment