summaryrefslogtreecommitdiff
path: root/kernel/src/testing
diff options
context:
space:
mode:
authorDennis Kobert <dennis@kobert.dev>2019-11-27 01:46:33 +0100
committerDennis Kobert <dennis@kobert.dev>2019-11-27 01:46:33 +0100
commit2701fe07b4c8c9b6a36112c98fbfc900acbd6cf3 (patch)
treed8b6d0c2ba3f79110a5c3b0c885749a14b8de25d /kernel/src/testing
parent0cb231bd3de9bcd4c39064399211fbd2fbc6237e (diff)
Implement proto Keyboard handlingHEADmaster
Diffstat (limited to 'kernel/src/testing')
-rw-r--r--kernel/src/testing/panic.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/src/testing/panic.rs b/kernel/src/testing/panic.rs
index 729a45f..de07ba8 100644
--- a/kernel/src/testing/panic.rs
+++ b/kernel/src/testing/panic.rs
@@ -4,8 +4,10 @@ use core::panic::PanicInfo;
use qemu::{exit_qemu, QemuExitCode};
use serial::SerialStream;
use vga_text::OStream;
+use x86_64::instructions::interrupts;
pub fn serial_should_panic(info: &PanicInfo) -> ! {
+ interrupts::disable();
let mut stdout = SerialStream::new();
write!(stdout, "\nOK\nsuccessfully panicked\n").unwrap();
exit_qemu(QemuExitCode::Success);
@@ -13,6 +15,7 @@ pub fn serial_should_panic(info: &PanicInfo) -> ! {
}
pub fn serial_panic(info: &PanicInfo) -> ! {
+ interrupts::disable();
crate::io::panic_screen::show(info.message());
let mut stdout = SerialStream::new();
write!(
@@ -26,11 +29,13 @@ pub fn serial_panic(info: &PanicInfo) -> ! {
}
pub fn should_panic(_info: &PanicInfo) -> ! {
+ interrupts::disable();
exit_qemu(QemuExitCode::Success);
loop {}
}
pub fn panic(info: &PanicInfo) -> ! {
+ interrupts::disable();
crate::io::panic_screen::show(info.message());
loop {}
}