mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-17 08:40:52 +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)?;
|
let process = self.get_process(pid)?;
|
||||||
if let Some(tid) = tid {
|
if let Some(tid) = tid {
|
||||||
Ok(match process.state {
|
Ok(match process.state {
|
||||||
ProcessState::Running(x) if x & (1 << tid) == 0 => true,
|
ProcessState::Running(x) | ProcessState::Ready(x) if x & (1 << tid) != 0 => true,
|
||||||
ProcessState::Ready(x) if x & (1 << tid) == 0 => true,
|
|
||||||
ProcessState::Sleeping => true,
|
ProcessState::Sleeping => true,
|
||||||
_ => false,
|
_ => false,
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue