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

Protect libcanard API calls within critical sections to prevent race conditions. #56

Merged
merged 5 commits into from
Dec 18, 2020

Conversation

aentinger
Copy link
Member

This fixes #55.

…e to follow that recommendation (and in fact isn't)
… implements the RAII-pattern around critical sections (automatic release of critical section lock when LockGuard object goes out of scope.
…ous access, therefore preventing race conditions and inconsistent data state
…as o1heap will only be called from within libcanard which in turn will only be called from within ArduinoUAVCAN which prevents multiple asynchronous access via critical sections.
@aentinger aentinger added topic: firmware Code that runs on an embedded system. priority: high type: enhancement PR to improve the project. labels Dec 18, 2020
@aentinger aentinger self-assigned this Dec 18, 2020
@aentinger aentinger merged commit cf7767a into master Dec 18, 2020
@aentinger aentinger deleted the protect-libcanard-api-calls-with-critical-section branch December 18, 2020 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: high topic: firmware Code that runs on an embedded system. type: enhancement PR to improve the project.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Encapsulate libcanard API calls within a critical section
1 participant