You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
495 B

use process::*;
use arch::interrupt::TrapFrame;
use arch::cpu;
pub static mut TICK: usize = 0;
pub fn timer() {
if cpu::id() == 0 {
unsafe { TICK += 1; }
}
processor().tick();
}
pub fn error(tf: &TrapFrame) -> ! {
error!("{:#x?}", tf);
let pid = processor().pid();
error!("On CPU{} Process {}", cpu::id(), pid);
processor().manager().exit(pid, 0x100);
processor().yield_now();
unreachable!();
}
pub fn serial(c: char) {
::fs::STDIN.push(c);
}