Initialize contexts, add getpid

This commit is contained in:
Jeremy Soller
2016-08-20 14:32:45 -06:00
parent 47280a921a
commit aecfa50029
4 changed files with 37 additions and 8 deletions
+6 -2
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() }