-
Notifications
You must be signed in to change notification settings - Fork 217
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
Exception/Interrupt API issues in OSAL #316
Labels
Milestone
Comments
jphickey
added a commit
to jphickey/osal
that referenced
this issue
Dec 13, 2019
- Ensure the FPU functions that are actually not implemented in RTEMS/POSIX all return OS_ERR_NOT_IMPLEMENTED, not OS_SUCCESS. - The RTEMS IntEnable/Disable API should not be a duplicate of the IntLock/Unlock API, as the semantics are slightly different. The Enable/Disable API should return OS_ERR_NOT_IMPLEMENTED. - The OS_FPUExcGetMask API should confirm that the output buffer is not NULL.
jphickey
added a commit
to jphickey/osal
that referenced
this issue
Dec 13, 2019
- Ensure the FPU functions that are actually not implemented in RTEMS/POSIX all return OS_ERR_NOT_IMPLEMENTED, not OS_SUCCESS. - The RTEMS IntEnable/Disable API should not be a duplicate of the IntLock/Unlock API, as the semantics are slightly different. The Enable/Disable API should return OS_ERR_NOT_IMPLEMENTED. - The OS_FPUExcGetMask API should confirm that the output buffer is not NULL.
skliper
pushed a commit
that referenced
this issue
Dec 30, 2019
- Ensure the FPU functions that are actually not implemented in RTEMS/POSIX all return OS_ERR_NOT_IMPLEMENTED, not OS_SUCCESS. - The RTEMS IntEnable/Disable API should not be a duplicate of the IntLock/Unlock API, as the semantics are slightly different. The Enable/Disable API should return OS_ERR_NOT_IMPLEMENTED. - The OS_FPUExcGetMask API should confirm that the output buffer is not NULL.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When running unit tests on the OSAL for the VxWorks, POSIX, and RTEMS environments, it revealed a few minor issues on the implementation side that should be addressed. These are all in the interrupt/fpu/exception API areas for which the CFE FSW does not really rely upon.
OS_ERR_NOT_IMPLEMENTED
, because these are in fact not implemented. ReturningOS_SUCCESS
, as some did, implies that the behavior took effect when it did not (this matters to UT). These are:OS_FPUExcSetMask_Impl()
OS_FPUExcGetMask_Impl()
OS_FPUExcEnable_Impl()
OS_FPUExcDisable_Impl()
RTEMS does not provide a direct equivalent for the OS_IntEnable/OS_IntDisable API like VxWorks has. The implementation had been using rtems_intterupt_enable/disable for this, but the semantics of those calls are different (they are more appropriate for OS_IntLock/OS_IntUnlock). The Enable/Disable implementation should just return
OS_ERR_NOT_IMPLEMENTED
.The RTEMS
OS_IntLock_Impl
/OS_IntUnlock_Impl
implementation should use the "local" variant of the RTEMS interrupt enable/disable function. This is documented as being identical on single-processor machines but only the local variant is applicable to multi-processor machines.The
OS_FPUExcGetMask()
API accepts a pointer as an output buffer, so to be consistent with all other API calls that accept a pointer, it should check for NULL and returnOS_INVALID_POINTER
in that case.To Reproduce
Execute the OSAL unit tests (including changeset for #313 to enable full testing) and some failures are reported due tot his.
Expected behavior
All unit tests should pass.
System observed on:
Reporter Info
Joseph Hickey, Vantage Systems, Inc.
The text was updated successfully, but these errors were encountered: