Skip to content

Commit ca66c01

Browse files
Merge pull request #13 from xy-plus/master
error exit will return to shell
2 parents 5a2f1d5 + 0639aff commit ca66c01

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)