redox/libstd_real/panic_unwind/src/lib.rs
Jeremy Soller 149b0297a4 Smp (#23)
* Fire up multiple processors

* Use IPIs to wake up secondary processors

* Much better exception information

* Modifications to show more information on fault

* WIP: Use real libstd

* Add TLS (not complete)

* Add random function, export getpid, cleanup

* Do not spin APs until new context

* Update rust

* Update rust

* Use rd/wrfsbase

* Implement TLS

* Implement compiler builtins and update rust

* Update rust

* Back to Redox libstd

* Update rust
2016-10-31 10:49:00 -06:00

28 lines
663 B
Rust

#![no_std]
#![feature(core_intrinsics)]
#![feature(lang_items)]
#![feature(panic_runtime)]
#![panic_runtime]
#[no_mangle]
pub unsafe extern fn __rust_maybe_catch_panic(f: fn(*mut u8), data: *mut u8,
_data_ptr: *mut usize, _vtable_ptr: *mut usize) -> u32 {
f(data);
0
}
#[no_mangle]
pub unsafe extern fn __rust_start_panic(_data: usize, _vtable: usize) -> u32 {
core::intrinsics::abort();
}
#[lang = "eh_personality"]
pub extern fn eh_personality() {}
#[allow(non_snake_case)]
#[no_mangle]
/// Required to handle panics
pub unsafe extern "C" fn _Unwind_Resume() -> ! {
core::intrinsics::abort();
}