diff options
| author | Liam <byteslice@airmail.cc> | 2022-06-30 16:54:05 -0400 |
|---|---|---|
| committer | Liam <byteslice@airmail.cc> | 2022-06-30 16:54:05 -0400 |
| commit | 61ef65ab2557145799bc75cfdda18b9b91b24440 (patch) | |
| tree | 1996677a825ccabe6a7d497c59d29f8e4672fa66 /src/core/cpu_manager.cpp | |
| parent | ee5d112e192ddbbedf066dfd6554914231aa278e (diff) | |
cpu_manager: properly check idle on return from preemption
Diffstat (limited to 'src/core/cpu_manager.cpp')
| -rw-r--r-- | src/core/cpu_manager.cpp | 4 |
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; + } } } |
