Move arch to seperate crate

This commit is contained in:
Jeremy Soller 2016-08-14 11:45:47 -06:00
commit 2730144e2a

25
kernel/panic.rs Normal file
View file

@ -0,0 +1,25 @@
//! Intrinsics for panic handling
use arch::interrupt::halt;
#[cfg(not(test))]
#[lang = "eh_personality"]
extern "C" fn eh_personality() {}
#[cfg(not(test))]
/// Required to handle panics
#[lang = "panic_fmt"]
extern "C" fn panic_fmt() -> ! {
loop {
unsafe { halt() };
}
}
#[allow(non_snake_case)]
#[no_mangle]
/// Required to handle panics
pub extern "C" fn _Unwind_Resume() -> ! {
loop {
unsafe { halt() }
}
}