From 4901453e3dd1779d15de9358fec48d15237a78a2 Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Mon, 21 Jun 2021 20:04:22 +0800 Subject: [PATCH] syscall: retor_mem: switch to client in hosted mode Switch to the message client when returning memory in Hosted mode. This properly marks a process as ready-to-run, which was otherwise not correctly done. Signed-off-by: Sean Cross --- kernel/src/syscall.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/src/syscall.rs b/kernel/src/syscall.rs index 33e93a4c7..36518fb2f 100644 --- a/kernel/src/syscall.rs +++ b/kernel/src/syscall.rs @@ -368,7 +368,8 @@ fn return_memory( // Send a message to the client, in order to wake it up // print!(" [waking up PID {}:{}]", client_pid, client_tid); ss.ready_thread(client_pid, client_tid)?; - // ss.switch_to_thread(client_pid, Some(client_tid))?; + #[cfg(not(baremetal))] + ss.switch_to_thread(client_pid, Some(client_tid))?; ss.set_thread_result( client_pid, client_tid,