diff --git a/kernel/src/arch/riscv/irq.rs b/kernel/src/arch/riscv/irq.rs index a1862cbfd..036361dbe 100644 --- a/kernel/src/arch/riscv/irq.rs +++ b/kernel/src/arch/riscv/irq.rs @@ -106,7 +106,7 @@ pub extern "C" fn trap_handler( let response = crate::syscall::handle(call).unwrap_or_else(|e| xous::Result::Error(e)); - println!("Result: {:?}", response); + // println!("Result: {:?}", response); let mut process = ProcessHandle::get(); let ctx = process.current_context(); diff --git a/kernel/src/arch/riscv/process.rs b/kernel/src/arch/riscv/process.rs index 1f8be326a..1eb77716b 100644 --- a/kernel/src/arch/riscv/process.rs +++ b/kernel/src/arch/riscv/process.rs @@ -111,8 +111,6 @@ impl Process { context.sepc = entrypoint; context.registers[1] = stack; - println!("Initialized context {} with entrypoint of {:08x}", self.current_context_nr(), entrypoint); - self.inner = Default::default(); } } diff --git a/kernel/src/services.rs b/kernel/src/services.rs index a6ab6796e..f3e8c96b0 100644 --- a/kernel/src/services.rs +++ b/kernel/src/services.rs @@ -455,10 +455,10 @@ impl SystemServices { new.state ); if new_context == 0 { - println!( - "PID {}: Looking for a valid context in the mask {:08b}", - new_pid, x - ); + // print!( + // "PID {}: Looking for a valid context in the mask {:08b}, curent context {} ({:08b})", + // new_pid, x, new.current_context, new.current_context + // ); new_context = new.current_context as usize; while x & (1 << new_context) == 0 { new_context += 1; @@ -471,6 +471,7 @@ impl SystemServices { return Err(xous::Error::ProcessNotFound); } } + // println!(" -- picked context {}", new_context); } else if x & (1 << new_context) == 0 { println!( "context is {:?}, which is not valid for new context {}", diff --git a/kernel/src/syscall.rs b/kernel/src/syscall.rs index 8b20895c9..0b6af9a1e 100644 --- a/kernel/src/syscall.rs +++ b/kernel/src/syscall.rs @@ -136,7 +136,7 @@ use xous::*; pub fn handle(call: SysCall) -> core::result::Result { let pid = arch::current_pid(); - println!("PID{} Syscall: {:?}", pid, call); + // println!("PID{} Syscall: {:?}", pid, call); match call { SysCall::MapMemory(phys, virt, size, req_flags) => { let mut mm = MemoryManagerHandle::get(); @@ -209,7 +209,10 @@ pub fn handle(call: SysCall) -> core::result::Result SysCall::SwitchTo(pid, context) => { let mut ss = SystemServicesHandle::get(); ss.activate_process_context(pid, context, true, false) - .map(|ctx| { println!("switchto ({}, {})", pid, ctx); xous::Result::ResumeProcess }) + .map(|ctx| { + // println!("switchto ({}, {})", pid, ctx); + xous::Result::ResumeProcess + }) } SysCall::ClaimInterrupt(no, callback, arg) => { interrupt_claim(no, pid as definitions::PID, callback, arg).map(|_| xous::Result::Ok) @@ -257,14 +260,11 @@ pub fn handle(call: SysCall) -> core::result::Result .map(|_| Ok(xous::Result::ResumeProcess)) .unwrap_or(Err(xous::Error::ProcessNotFound)) } - SysCall::SpawnThread( - entrypoint, - stack_pointer, - argument , - ) => { + SysCall::SpawnThread(entrypoint, stack_pointer, argument) => { let mut ss = SystemServicesHandle::get(); - ss.spawn_thread(entrypoint, stack_pointer, argument).map(|ctx| xous::Result::ThreadID(ctx)) - }, + ss.spawn_thread(entrypoint, stack_pointer, argument) + .map(|ctx| xous::Result::ThreadID(ctx)) + } SysCall::CreateServer(name) => { let mut ss = SystemServicesHandle::get(); ss.create_server(name).map(|x| xous::Result::ServerID(x))