pub_just/
interrupt_guard.rs

1use super::*;
2
3pub struct InterruptGuard;
4
5impl InterruptGuard {
6  pub fn new() -> Self {
7    InterruptHandler::instance().block();
8    Self
9  }
10}
11
12impl Drop for InterruptGuard {
13  fn drop(&mut self) {
14    InterruptHandler::instance().unblock();
15  }
16}