Crates.io | interrupts |
lib.rs | interrupts |
version | 0.1.5 |
source | src |
created_at | 2023-09-18 15:15:18.80789 |
updated_at | 2024-02-26 09:36:57.448137 |
description | Cross-architecture utilities for temporarily disabling interrupts and signals. |
homepage | |
repository | https://github.com/mkroening/interrupts |
max_upload_size | |
id | 976001 |
size | 26,873 |
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.
RefCell
for sharing data with interrupt handlers or signal handlers on the same thread.)Licensed under either of
at your option.
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.