kernel: don't activate target thread on hosted mode

This operation is unneeded on hosted, and causes an error.

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2021-03-23 21:35:52 +08:00
parent bf3a3879d2
commit 861565054e

View file

@ -743,9 +743,13 @@ pub fn handle_inner(pid: PID, tid: TID, in_irq: bool, call: SysCall) -> SysCallR
let ppid = process.ppid;
unsafe { SWITCHTO_CALLER = None };
// TODO: Advance thread
ss.activate_process_thread(tid, ppid, 0, false)
.map(|_| Ok(xous_kernel::Result::ResumeProcess))
.unwrap_or(Err(xous_kernel::Error::ProcessNotFound))
if cfg!(baremetal) {
ss.activate_process_thread(tid, ppid, 0, false)
.map(|_| Ok(xous_kernel::Result::ResumeProcess))
.unwrap_or(Err(xous_kernel::Error::ProcessNotFound))
} else {
Ok(xous_kernel::Result::Ok)
}
}),
SysCall::CreateThread(thread_init) => SystemServices::with_mut(|ss| {
ss.create_thread(pid, thread_init).map(|new_tid| {