1cb90f4e65
Eventually, there will probably be a `crate` visibility specifier that does the same thing as `pub(crate)`. This commit replaces `pub` with `pub(crate)`, so when `crate` is available we can easily switch to it.
17 lines
294 B
Rust
17 lines
294 B
Rust
use crate::common::*;
|
|
|
|
pub(crate) struct InterruptGuard;
|
|
|
|
impl InterruptGuard {
|
|
pub(crate) fn new() -> InterruptGuard {
|
|
InterruptHandler::instance().block();
|
|
InterruptGuard
|
|
}
|
|
}
|
|
|
|
impl Drop for InterruptGuard {
|
|
fn drop(&mut self) {
|
|
InterruptHandler::instance().unblock();
|
|
}
|
|
}
|