gila/kernel/src/util.rs
August 88fe204b02
Some checks failed
Continuous Integration / Check (push) Successful in 1m57s
Continuous Integration / Clippy (push) Has been cancelled
Convert to workspace
2025-11-13 17:09:20 -05: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();
};
}