-
- Downloads
rust: Introduce irq module
This introduces a module for dealing with interrupt-disabled contexts,
including the ability to enable and disable interrupts
(with_irqs_disabled()) - along with the ability to annotate functions as
expecting that IRQs are already disabled on the local CPU.
Signed-off-by:
Lyude Paul <lyude@redhat.com>
---
V2:
* Actually make it so that we check whether or not we have interrupts
disabled with debug assertions
* Fix issues in the documentation (added suggestions, missing periods, made
sure that all rustdoc examples compile properly)
* Pass IrqDisabled by value, not reference
* Ensure that IrqDisabled is !Send and !Sync using
PhantomData<(&'a (), *mut ())>
* Add all of the suggested derives from Benno Lossin
V3:
* Use `impl` for FnOnce bounds in with_irqs_disabled()
* Use higher-ranked trait bounds for the lifetime of with_irqs_disabled()
* Wording changes in the documentation for the module itself
Loading
Please register or sign in to comment