mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-12-24 18:32:49 -06:00
Kernel: Correct Paused scheduling
This commit is contained in:
parent
1c6a11ab14
commit
96b1b144af
1 changed files with 1 additions and 3 deletions
|
@ -354,9 +354,7 @@ void Thread::SetActivity(ThreadActivity value) {
|
||||||
|
|
||||||
if (value == ThreadActivity::Paused) {
|
if (value == ThreadActivity::Paused) {
|
||||||
// Set status if not waiting
|
// Set status if not waiting
|
||||||
if (status == ThreadStatus::Ready) {
|
if (status == ThreadStatus::Ready || status == ThreadStatus::Running) {
|
||||||
status = ThreadStatus::Paused;
|
|
||||||
} else if (status == ThreadStatus::Running) {
|
|
||||||
SetStatus(ThreadStatus::Paused);
|
SetStatus(ThreadStatus::Paused);
|
||||||
Core::System::GetInstance().CpuCore(processor_id).PrepareReschedule();
|
Core::System::GetInstance().CpuCore(processor_id).PrepareReschedule();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue