-
Notifications
You must be signed in to change notification settings - Fork 12
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
riot-rs-threads: cortex_m: make sched()
less hacky
#187
riot-rs-threads: cortex_m: make sched()
less hacky
#187
Conversation
(marked as draft as this needs testing) |
Friendly ping @kaspar030. Is anything blocking this PR? I am currently working on an alternative implementation of #241, where these changes are relevant. Happy to take over the PR and do the rebasing/ solving of merge conflicts. |
261b128
to
e3966d2
Compare
I've rebased the PR and updated it to support the |
e3966d2
to
67d5a40
Compare
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.
LGTM. Thanks!
Refactor `arch::cortex_m::sched`, based on future-proof-iot#187. The previous implementation didn't use `CriticalSection` correctly, which allowed two threads on different cores to enter `sched` at the same time.
This moves the previusly manual critical section into
sched()
, and uses a "u128" to pass our values to the assembly.(this adds an instruction or two, but on nrf52840dk, this is barely measurable).