diff --git a/kernel/src/arch/hosted.rs b/kernel/src/arch/hosted.rs index 444802757..892922647 100644 --- a/kernel/src/arch/hosted.rs +++ b/kernel/src/arch/hosted.rs @@ -202,7 +202,7 @@ fn handle_connection( ); msg.buf.addr = match MemoryAddress::new(Box::into_raw(sliced_data) - as *mut usize + as *mut u8 as usize) { Some(a) => a, diff --git a/kernel/src/mem.rs b/kernel/src/mem.rs index 29ab6f5ca..e1fd40258 100644 --- a/kernel/src/mem.rs +++ b/kernel/src/mem.rs @@ -139,7 +139,7 @@ impl MemoryManager { for tag in args_iter { if tag.name == make_type!("MREx") { assert!( - self.extra.len() == 0, + self.extra.is_empty(), "mm: MREx tag appears twice! self.extra.len() is {}, not 0", self.extra.len() ); diff --git a/kernel/src/server.rs b/kernel/src/server.rs index aa020f82d..dd1494460 100644 --- a/kernel/src/server.rs +++ b/kernel/src/server.rs @@ -221,8 +221,8 @@ impl Server { /// giving it back to the previous process space. pub fn discard_messages_for_pid(&mut self, pid: PID) { for entry in self.queue.iter_mut() { - match entry { - &mut QueuedMessage::MemoryMessageROLend( + match *entry { + QueuedMessage::MemoryMessageROLend( msg_pid, ctx, arg1, @@ -238,7 +238,7 @@ impl Server { ); } } - &mut QueuedMessage::MemoryMessageRWLend( + QueuedMessage::MemoryMessageRWLend( msg_pid, ctx, arg1, diff --git a/kernel/src/services.rs b/kernel/src/services.rs index c0bc9079f..b432c2609 100644 --- a/kernel/src/services.rs +++ b/kernel/src/services.rs @@ -48,7 +48,7 @@ pub enum ProcessState { /// This is a brand-new process that hasn't been run yet, and needs its /// initial context set up. - Setup(ThreadInit), + // Setup(ThreadInit), /// This process is able to be run. The context bitmask describes contexts /// that are ready. @@ -161,7 +161,7 @@ impl Process { /// This process has at least one context that may be run pub fn runnable(&self) -> bool { match self.state { - ProcessState::Setup(_) | ProcessState::Ready(_) => true, + /*ProcessState::Setup(_) | */ProcessState::Ready(_) => true, _ => false, } } @@ -517,7 +517,7 @@ impl SystemServices { process.state = match process.state { ProcessState::Free => return Err(xous::Error::ProcessNotFound), ProcessState::Sleeping => return Err(xous::Error::ProcessNotFound), - ProcessState::Allocated => return Err(xous::Error::ProcessNotFound), + ProcessState::Allocated => return Err(xous::Error::ProcessNotFound),/* ProcessState::Setup(setup) => { // Activate the process, which enables its memory mapping process.activate()?; @@ -537,7 +537,7 @@ impl SystemServices { // Mark the current proces state as "running, and no waiting contexts" ProcessState::Running(0) - } + }*/ ProcessState::Ready(0) => { panic!("ProcessState was `Ready(0)`, which is invalid!"); } @@ -737,7 +737,7 @@ impl SystemServices { // Ensure the new process can be run. match new.state { ProcessState::Free => return Err(xous::Error::ProcessNotFound), - ProcessState::Setup(_) | ProcessState::Allocated => new_tid = INITIAL_TID, + /*ProcessState::Setup(_) | */ProcessState::Allocated => new_tid = INITIAL_TID, ProcessState::Running(x) | ProcessState::Ready(x) => { // If no new context is specified, take the previous // context. If that is not runnable, do a round-robin @@ -784,7 +784,7 @@ impl SystemServices { // Set up the new process, if necessary. Remove the new context from // the list of ready contexts. new.state = match new.state { - ProcessState::Setup(_init_context) => { + /*ProcessState::Setup(_init_context) => { // entrypoint, stack, stack_size) => { // let mut process = ProcessHandle::get(); // println!( @@ -803,7 +803,7 @@ impl SystemServices { // ) // .expect("couldn't reserve stack"); ProcessState::Running(0) - } + }*/ ProcessState::Allocated => ProcessState::Running(0), ProcessState::Free => panic!("process was suddenly Free"), ProcessState::Ready(x) | ProcessState::Running(x) => { diff --git a/xous-rs/src/arch/hosted.rs b/xous-rs/src/arch/hosted.rs index 0a2cba4f0..069730b0d 100644 --- a/xous-rs/src/arch/hosted.rs +++ b/xous-rs/src/arch/hosted.rs @@ -180,7 +180,7 @@ mod process { eprintln!("couldn't start command: {}", e); crate::Error::InternalError }); - println!("Process result: {:?}", result); + // println!("Process result: {:?}", result); result }