-
Notifications
You must be signed in to change notification settings - Fork 161
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
Add implementation for critical-section 1.0, for cortex-m v0.7.x #448
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
|
e30b3b2
to
d54404f
Compare
Made |
ffa005e
to
470759a
Compare
So in 0.7.6, |
That's right. We couldn't have |
I wouldn't make I'd just accept the fact that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bors r+
Build succeeded: |
110: Add critical-section 1.0 implementation, fix multicore unsoundness. r=almindor a=Dirbaio ~~Requires #109~~ This adds a [critical-section](https://github.com/rust-embedded/critical-section) implementation for single-core chips, based on disabling all interrupts. `interrupt::free` is is unsound on multicore systems because it only disables interrupts in the current core. For multicore chips, a chip-specific critical section implementationis needed instead. Unsoundness is fixed by not returning the `CriticalSection` token. This is a breaking change. This is the riscv equivalent of rust-embedded/cortex-m#447 and rust-embedded/cortex-m#448 Co-authored-by: Dario Nieuwenhuis <[email protected]>
This is a subset of #447 without any breaking changes, just adding the
critical-section
implementation.The goal is to release it in 0.7.6 so
critical-section
becomes usable without having to wait for cortex-m 0.8.TODO before merging:
critical-section 1.0
release v1.0.0 release critical-section#19