Revert "Revert "kernel: services: remember new thread if specified""

This reverts commit c72d67203a.
This commit is contained in:
bunnie 2021-03-23 23:37:54 +08:00
parent c72d67203a
commit e39c186c4a

View file

@ -852,13 +852,15 @@ impl SystemServices {
} }
} }
new.current_thread = new_tid as _; new.current_thread = new_tid as _;
// println!(" -- picked thread {}", new_tid); klog!("picked thread ID {}", new_tid);
} else if x & (1 << new_tid) == 0 { } else if x & (1 << new_tid) == 0 {
// println!( // println!(
// "thread is {:?}, which is not valid for new thread {}", // "thread is {:?}, which is not valid for new thread {}",
// new.state, new_tid // new.state, new_tid
// ); // );
return Err(xous_kernel::Error::ProcessNotFound); return Err(xous_kernel::Error::ProcessNotFound);
} else {
new.current_thread = new_tid as _;
} }
} }
ProcessState::Sleeping => { ProcessState::Sleeping => {