mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
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 <sean@xobs.io>
This commit is contained in:
parent
eb2014bc80
commit
568d1263a3
1 changed files with 2 additions and 2 deletions
|
|
@ -185,7 +185,7 @@ fn send_message(pid: PID, thread: TID, cid: CID, message: Message) -> SysCallRes
|
||||||
|
|
||||||
if blocking && cfg!(baremetal) {
|
if blocking && cfg!(baremetal) {
|
||||||
klog!("Activating Server context and switching away from Client");
|
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)))
|
.map(|_| Ok(xous_kernel::Result::Message(envelope)))
|
||||||
.unwrap_or(Err(xous_kernel::Error::ProcessNotFound))
|
.unwrap_or(Err(xous_kernel::Error::ProcessNotFound))
|
||||||
} else if blocking && !cfg!(baremetal) {
|
} 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 process = ss.get_process(pid).expect("Can't get current process");
|
||||||
let ppid = process.ppid;
|
let ppid = process.ppid;
|
||||||
unsafe { SWITCHTO_CALLER = None };
|
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))
|
.map(|_| Ok(xous_kernel::Result::ResumeProcess))
|
||||||
.unwrap_or(Err(xous_kernel::Error::ProcessNotFound))
|
.unwrap_or(Err(xous_kernel::Error::ProcessNotFound))
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue