Hardware Interrupts

This commit is contained in:
2022-01-11 17:09:13 +08:00
parent f0f10fc701
commit 6f67926a75
7 changed files with 119 additions and 19 deletions

View File

@@ -13,7 +13,14 @@ lazy_static! {
#[doc(hidden)]
pub fn _print(args: ::core::fmt::Arguments) {
use core::fmt::Write;
SERIAL1.lock().write_fmt(args).expect("Printing to serial failed");
use x86_64::instructions::interrupts;
interrupts::without_interrupts(|| {
SERIAL1
.lock()
.write_fmt(args)
.expect("Printing to serial failed");
});
}
#[macro_export]