Skip to content

Cross-architecture utilities for temporarily disabling interrupts and signals.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

mkroening/interrupts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

interrupts

Crates.io docs.rs CI

Cross-architecture utilities for temporarily disabling interrupts and signals.

Use disable to disable interrupts with a guard:

// interrupts may or may not be enabled
let guard = interrupts::disable();
// interrupts are disabled
drop(guard);
// interrupts are restored to the previous state

Use without to run a closure with disabled interrupts:

// interrupts may or may not be enabled
interrupts::without(|| {
    // interrupts are disabled
});
// interrupts are restored to the previous state

For API documentation, see the docs.

Related Crates

  • interrupt-ref-cell (A RefCell for sharing data with interrupt handlers or signal handlers on the same thread.)
  • interrupt-mutex (A mutex for sharing data with interrupt handlers or signal handlers.)

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

Cross-architecture utilities for temporarily disabling interrupts and signals.

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Languages