1
0
mirror of https://github.com/rcore-os/rCore.git synced 2024-11-27 02:03:29 +04:00
rCore/kernel/src/trap.rs

19 lines
386 B
Rust
Raw Normal View History

2018-07-16 20:23:02 +04:00
use process::*;
use arch::interrupt::TrapFrame;
use arch::cpu;
pub fn timer() {
processor().tick();
}
pub fn before_return() {
2018-07-16 20:23:02 +04:00
}
2018-07-17 08:07:21 +04:00
pub fn error(tf: &TrapFrame) -> ! {
let pid = processor().pid();
error!("On CPU{} Process {}:\n{:#x?}", cpu::id(), pid, tf);
processor().manager().set_status(pid, Status::Exited(0x100));
processor().yield_now();
unreachable!();
}