add hosted mode bits back in

This commit is contained in:
bunnie 2020-10-14 23:04:54 +08:00
parent 6ff8c8518c
commit 9a8c402cc2

View file

@ -300,11 +300,12 @@ fn return_memory(pid: PID, tid: TID, sender: MessageSender, buf: MemoryRange) ->
// "KERNEL({}): Unblocking PID {} CTX {}", // "KERNEL({}): Unblocking PID {} CTX {}",
// pid, client_pid, client_ctx // pid, client_pid, client_ctx
// ); // );
/* if !cfg!(baremetal) {
ss.ready_thread(client_pid, client_tid)?; ss.ready_thread(client_pid, client_tid)?;
ss.switch_to_thread(client_pid, Some(client_tid))?; ss.switch_to_thread(client_pid, Some(client_tid))?;
ss.set_thread_result(client_pid, client_tid, xous_kernel::Result::Ok)?;*/ ss.set_thread_result(client_pid, client_tid, xous_kernel::Result::Ok)?;
Ok(xous_kernel::Result::Ok)
} else {
// Switch away from the server, but leave it as Runnable // Switch away from the server, but leave it as Runnable
ss.switch_from_thread(pid, tid)?; ss.switch_from_thread(pid, tid)?;
ss.ready_thread(pid, tid)?; ss.ready_thread(pid, tid)?;
@ -314,6 +315,7 @@ fn return_memory(pid: PID, tid: TID, sender: MessageSender, buf: MemoryRange) ->
ss.ready_thread(client_pid, client_tid)?; ss.ready_thread(client_pid, client_tid)?;
ss.switch_to_thread(client_pid, Some(client_tid))?; ss.switch_to_thread(client_pid, Some(client_tid))?;
Ok(xous_kernel::Result::Ok) Ok(xous_kernel::Result::Ok)
}
}) })
} }