-
Notifications
You must be signed in to change notification settings - Fork 203
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
Do not rely on OSAL SOFTWARE_(BIG|LITTLE)_BIT_ORDER #1217
Comments
Could be part of #1209 |
jphickey
added a commit
to jphickey/cFE
that referenced
this issue
Mar 10, 2021
In a future version OSAL "common_types.h" will no longer provide the bit/byte order macros. This puts the same determination logic directly in cfe_endian.h. Same basic issues still present, just now confined to CFE, and put in a localized header that should be only used by code with an actual endianness dependency, rather than a ubiquitous header that is used everywhere.
jphickey
added a commit
to jphickey/cFE
that referenced
this issue
Mar 16, 2021
In a future version OSAL "common_types.h" will no longer provide the bit/byte order macros. This puts the same determination logic directly in cfe_endian.h. Same basic issues still present, just now confined to CFE, and put in a localized header that should be only used by code with an actual endianness dependency, rather than a ubiquitous header that is used everywhere.
jphickey
added a commit
to jphickey/cFE
that referenced
this issue
Mar 16, 2021
In a future version OSAL "common_types.h" will no longer provide the bit/byte order macros. This puts the same determination logic directly in cfe_endian.h. Same basic issues still present, just now confined to CFE, and put in a localized header that should be only used by code with an actual endianness dependency, rather than a ubiquitous header that is used everywhere.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
These endian-indicator macros are problematic for many reasons as documented in nasa/osal#843. The continued presence of these macros in OSAL came up again in a recent code review.
OSAL will likely stop providing these macros in the next version, because nothing in OSAL is endian-dependent.
CFE only uses these to implement CFE_MAKE_BIG16 / CFE_MAKE_BIG32 macros.
Describe the solution you'd like
Move the nonstandard logic from OSAL into CFE, because nothing in OSAL depends on it.
For backward compatibility CFE will likely still have to provide this macro for historical reasons, in case some apps use it, and because TIME uses those CFE_MAKE_BIG* macros.
Additional context
See nasa/osal#843
In CFE the logic should be put in a separate header where it can be confined/limited to the scopes where this is actually used/needed, rather than a ubiquitous header like
common_types.h
. This way an#error
directive if the check was inconclusive will make more sense since it won't error out on cases where we don't care (i.e. most).Requester Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered: