gila/src/kernel/util.rs
August c6e032d9c9
All checks were successful
Continuous Integration / Check (push) Successful in 42s
Continuous Integration / Clippy (push) Successful in 40s
Back to one crate. idk what I was doing earlier
2026-06-30 20:45:09 +00:00

14 lines
368 B
Rust

// Copyright (c) 2025 shibedrill
// SPDX-License-Identifier: MIT
/// Critical section: Mark a section of code as critical.
/// Interrupts will be disabled until the section completes.
#[macro_export]
macro_rules! critical_section {
($b:block) => {
$crate::arch::asm::interrupt_disable();
$b
$crate::arch::asm::interrupt_enable();
};
}