Skip to content

Commit 0639aff

Browse files
committed
error exit will return to shell
1 parent 5a2f1d5 commit 0639aff

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

kernel/src/trap.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ pub fn timer() {
2020

2121
pub fn error(tf: &TrapFrame) -> ! {
2222
error!("{:#x?}", tf);
23-
let tid = processor().tid();
24-
error!("On CPU{} Thread {}", cpu::id(), tid);
25-
26-
processor().manager().exit(tid, 0x100);
23+
unsafe {
24+
let mut proc = current_thread().proc.lock();
25+
proc.exit(0x100);
26+
}
2727
processor().yield_now();
2828
unreachable!();
2929
}

0 commit comments

Comments
 (0)