mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
fix scheduler bug (credit: @xobs)
@xobs found a scheduler bug that would trigger a runnable process search every time a scalar message returned. This fixes the problem, causing the quantum to go back to the caller as intended. Improves performance on the syscall by about 40%.
This commit is contained in:
parent
aa48476937
commit
7be4a88a9b
1 changed files with 1 additions and 2 deletions
|
|
@ -653,8 +653,7 @@ impl SystemServices {
|
|||
let process = self.get_process(pid)?;
|
||||
if let Some(tid) = tid {
|
||||
Ok(match process.state {
|
||||
ProcessState::Running(x) if x & (1 << tid) == 0 => true,
|
||||
ProcessState::Ready(x) if x & (1 << tid) == 0 => true,
|
||||
ProcessState::Running(x) | ProcessState::Ready(x) if x & (1 << tid) != 0 => true,
|
||||
ProcessState::Sleeping => true,
|
||||
_ => false,
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue