aboutsummaryrefslogtreecommitdiff
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
commite41dd008c8638309856174f69f39f2e604f81660 (patch)
tree2e66dc86f9ee31763bbed780e7df2970900fa4df /src/core/cpu_manager.cpp
parentf64cc85d4be4e5680367964ee0e9520bb0da353d (diff)
parent61ef65ab2557145799bc75cfdda18b9b91b24440 (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 fd6928105a..9fc78f033c 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;
+ }
}
}