Skip to content

Commit

Permalink
panic: disable interrupts before unwinding
Browse files Browse the repository at this point in the history
  • Loading branch information
barzamin committed Oct 22, 2018
1 parent 95f8624 commit 90c40cc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/panic.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
use core::panic::PanicInfo;
use x86_64;

/// Dumps panics to the console.
#[panic_handler]
#[no_mangle]
pub extern "C" fn panic(info: &PanicInfo) -> ! {
x86_64::instructions::interrupts::disable();

#[cfg(feature = "panic-console")]
{
use ::arch::x86_64::device::vga_console;
Expand Down

0 comments on commit 90c40cc

Please sign in to comment.