Arch context in kernel context

This commit is contained in:
Jeremy Soller 2016-08-24 10:35:42 -06:00
parent f6e57ff5d1
commit 2be7ccaec2
3 changed files with 60 additions and 16 deletions

View file

@ -110,12 +110,24 @@ pub mod syscall;
#[cfg(test)]
pub mod tests;
pub extern fn context_test() {
print!("TEST\n");
loop {
unsafe { interrupt::enable_and_halt(); }
}
}
#[no_mangle]
pub extern fn kmain() {
context::init();
print!("{}", format!("BSP: {:?}\n", syscall::getpid()));
if let Ok(context) = context::contexts_mut().spawn(context_test) {
}
loop {
unsafe { interrupt::enable_and_halt(); }
}