-
Notifications
You must be signed in to change notification settings - Fork 82
Open
Labels
runtimeRelated to startup/interrupts/runtimeRelated to startup/interrupts/runtime
Description
We're currently relying on the mutex type from bare-metal
which is actually being removed upstream so now is a good time to think about adding a similar mechanism here and maybe improving it. For starters, I'd want the mutex to actually hand out &mut _
references because 99% of use-cases need this.
It would be interesting to explore the concept of a critical-section handle a bit more:
- Maybe ISRs should optionally get a
cs
-handle as an argument as nothing could interrupt them? - Even further, maybe main should get a
cs
-handle in the beginning? Interrupts are disabled so it would be sound. Then, later aninterrupt::enable()
function should consume the handle when enabling interrupts for the first time. Is there a problem I'm missing?
Metadata
Metadata
Assignees
Labels
runtimeRelated to startup/interrupts/runtimeRelated to startup/interrupts/runtime