From 568d1263a3e1754cd13a95eccf043cd83a0ece27 Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Thu, 25 Mar 2021 09:14:43 +0800 Subject: [PATCH] kernel: syscall: remove variables that never change The `can_resume` variable doesn't change, and can be made a constant. This slightly improves reasoning about what the function is doing. Signed-off-by: Sean Cross --- kernel/src/syscall.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/src/syscall.rs b/kernel/src/syscall.rs index 112ac856a..333c5fcda 100644 --- a/kernel/src/syscall.rs +++ b/kernel/src/syscall.rs @@ -185,7 +185,7 @@ fn send_message(pid: PID, thread: TID, cid: CID, message: Message) -> SysCallRes if blocking && cfg!(baremetal) { klog!("Activating Server context and switching away from Client"); - ss.activate_process_thread(thread, server_pid, server_tid, !blocking) + ss.activate_process_thread(thread, server_pid, server_tid, false) .map(|_| Ok(xous_kernel::Result::Message(envelope))) .unwrap_or(Err(xous_kernel::Error::ProcessNotFound)) } else if blocking && !cfg!(baremetal) { @@ -239,7 +239,7 @@ fn send_message(pid: PID, thread: TID, cid: CID, message: Message) -> SysCallRes let process = ss.get_process(pid).expect("Can't get current process"); let ppid = process.ppid; unsafe { SWITCHTO_CALLER = None }; - ss.activate_process_thread(thread, ppid, 0, !blocking) + ss.activate_process_thread(thread, ppid, 0, false) .map(|_| Ok(xous_kernel::Result::ResumeProcess)) .unwrap_or(Err(xous_kernel::Error::ProcessNotFound)) } else {