Force unlock writer on panic to avoid deadlocks

This commit is contained in:
Philipp Oppermann
2020-01-23 10:42:19 +01:00
parent e5d10fcaec
commit 35379c90e6

View File

@@ -98,6 +98,7 @@ fn thread_3() -> ! {
#[cfg(not(test))] #[cfg(not(test))]
#[panic_handler] #[panic_handler]
fn panic(info: &PanicInfo) -> ! { fn panic(info: &PanicInfo) -> ! {
unsafe { blog_os::vga_buffer::WRITER.force_unlock(); }
println!("{}", info); println!("{}", info);
blog_os::hlt_loop(); blog_os::hlt_loop();
} }