mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
fix more clippy warnings
Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
869ebcff8b
commit
ef0ef924c8
5 changed files with 13 additions and 13 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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) => {
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ mod process {
|
|||
eprintln!("couldn't start command: {}", e);
|
||||
crate::Error::InternalError
|
||||
});
|
||||
println!("Process result: {:?}", result);
|
||||
// println!("Process result: {:?}", result);
|
||||
result
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue