Initialize contexts, add getpid

This commit is contained in:
Jeremy Soller 2016-08-20 14:32:45 -06:00
parent 3b8f396229
commit 5b9c821ff5
4 changed files with 37 additions and 8 deletions

View file

@ -112,7 +112,9 @@ pub mod tests;
#[no_mangle]
pub extern fn kmain() {
print!("{}", format!("BSP\n"));
context::init();
print!("{}", format!("BSP: {:?}\n", syscall::getpid()));
loop {
unsafe { interrupt::enable_and_halt(); }
@ -121,7 +123,9 @@ pub extern fn kmain() {
#[no_mangle]
pub extern fn kmain_ap(id: usize) {
print!("{}", format!("AP {}\n", id));
context::init();
print!("{}", format!("AP {}: {:?}\n", id, syscall::getpid()));
loop {
unsafe { interrupt::enable_and_halt() }