summaryrefslogtreecommitdiff
path: root/src/core/cpu_manager.cpp
diff options
context:
space:
mode:
authorFernando S <fsahmkow27@gmail.com>2022-07-01 22:40:02 +0200
committerGitHub <noreply@github.com>2022-07-01 22:40:02 +0200
commit3f3c2dc20fec7c922c4f9ef5774f198fbb6aee31 (patch)
tree2e66dc86f9ee31763bbed780e7df2970900fa4df /src/core/cpu_manager.cpp
parent78ce053b4dab30c362cfc1f79762e42d62e84695 (diff)
parent2c1e2c63c302dc4a2f0ad3452263d715d77aba8c (diff)
Merge pull request #8523 from liamwhite/sc-oopsie
cpu_manager: properly check idle on return from preemption
Diffstat (limited to 'src/core/cpu_manager.cpp')
-rw-r--r--src/core/cpu_manager.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/cpu_manager.cpp b/src/core/cpu_manager.cpp
index fd6928105..9fc78f033 100644
--- a/src/core/cpu_manager.cpp
+++ b/src/core/cpu_manager.cpp
@@ -194,7 +194,9 @@ void CpuManager::PreemptSingleCore(bool from_running_enviroment) {
{
auto& scheduler = system.Kernel().Scheduler(current_core);
scheduler.Reload(scheduler.GetSchedulerCurrentThread());
- idle_count = 0;
+ if (!scheduler.IsIdle()) {
+ idle_count = 0;
+ }
}
}