diff options
| author | Natasha Moongrave <natasha@256phi.eu> | 2026-03-10 13:26:25 +0100 |
|---|---|---|
| committer | Natasha Moongrave <natasha@256phi.eu> | 2026-03-10 13:26:25 +0100 |
| commit | 56e898c9a07f2fd1d618ca514549015dd1bcaa9b (patch) | |
| tree | abfd7703d6f041adb40a81aa9f77fd9fe30e8c88 | |
| parent | 713c8b06e723cc3c0e544ed359f28a45f9f1759e (diff) | |
modified _print() in src/vga_buffer.rs to avoid a deadlock by disabling interrupts as long as the Mutex is locked
| -rw-r--r-- | StrixKernel/src/vga_buffer.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/StrixKernel/src/vga_buffer.rs b/StrixKernel/src/vga_buffer.rs index 70f2952..9e4ffcf 100644 --- a/StrixKernel/src/vga_buffer.rs +++ b/StrixKernel/src/vga_buffer.rs @@ -167,7 +167,11 @@ macro_rules! println { #[doc(hidden)] pub fn _print(args: fmt::Arguments) { use core::fmt::Write; - WRITER.lock().write_fmt(args).unwrap(); + use x86_64::instructions::interrupts; + + interrupts::without_interrupts(|| { + WRITER.lock().write_fmt(args).unwrap(); + }); } #[test_case] |
