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

Clean up inconsistent implementation of OS_Lock_Global_Impl/OS_Unlock_Global_Impl #701

Closed
jphickey opened this issue Dec 21, 2020 · 0 comments · Fixed by #704
Closed

Clean up inconsistent implementation of OS_Lock_Global_Impl/OS_Unlock_Global_Impl #701

jphickey opened this issue Dec 21, 2020 · 0 comments · Fixed by #704
Assignees
Milestone

Comments

@jphickey
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Only the "shared" layer invokes these impl (low level) APIs - they are not invoked directly by applications, and the shared layer has already done its error checking. Therefore they should never be invoked with a bad object type, and there is no recourse if the implementation fails.

Describe the solution you'd like

  • Make sure "shared" layer is doing the appropriate scrubbing of object type before calling "impl" layer.
  • Remove duplicate/unnecessary error checking in "impl" layer that was already performed at "shared" layer.
  • Make "impl" functions return void - these should never fail, and there is no feasible recovery if they do. The only way they can fail is if they weren't initialized properly. The OS_DEBUG message that is printed is the only recourse.

Additional context
Error checking should be consolidated at "shared" layer, layer whenever possible, as this keeps "impl" layer simpler, and also ensures that the same error checking is done on all platforms - so all platforms work the same. Right now the error checking in these functions is not quite the same between POSIX/VxWorks/RTEMS.

Requester Info
Joseph Hickey, Vantage Systems, Inc.

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.

2 participants