diff --git a/kernel/src/trap.rs b/kernel/src/trap.rs index 037827a..4ec47eb 100644 --- a/kernel/src/trap.rs +++ b/kernel/src/trap.rs @@ -18,17 +18,18 @@ pub fn timer() { processor().tick(); } -pub fn error(tf: &TrapFrame) -> ! { +pub fn error(tf: &mut TrapFrame) -> ! { + use crate::arch::syscall::*; error!("{:#x?}", tf); let tid = processor().tid(); error!("On CPU{} Thread {}", cpu::id(), tid); - processor().manager().exit(tid, 0x100); - processor().yield_now(); + crate::syscall::syscall(SYS_EXIT_GROUP, [0x100, 0, 0, 0, 0, 0], tf); unreachable!(); } pub fn serial(c: char) { + trace!("Serial input: {:X}", c as u8); if c == '\r' { // in linux, we use '\n' instead crate::fs::STDIN.push('\n');