diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2020-02-13 22:01:44 +0100 |
---|---|---|
committer | FernandoS27 <fsahmkow27@gmail.com> | 2020-02-14 00:10:33 +0100 |
commit | 2bc949628dfa2efe9a18660b9d662e2a25cef9f9 (patch) | |
tree | 84b72d7b0fcf8838c34c9ae0943dc297fa539e5b /src/core/hle/kernel/scheduler.cpp | |
parent | Core: Set all hardware emulation constants in a single file. (diff) | |
download | yuzu-2bc949628dfa2efe9a18660b9d662e2a25cef9f9.tar yuzu-2bc949628dfa2efe9a18660b9d662e2a25cef9f9.tar.gz yuzu-2bc949628dfa2efe9a18660b9d662e2a25cef9f9.tar.bz2 yuzu-2bc949628dfa2efe9a18660b9d662e2a25cef9f9.tar.lz yuzu-2bc949628dfa2efe9a18660b9d662e2a25cef9f9.tar.xz yuzu-2bc949628dfa2efe9a18660b9d662e2a25cef9f9.tar.zst yuzu-2bc949628dfa2efe9a18660b9d662e2a25cef9f9.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/scheduler.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/hle/kernel/scheduler.cpp b/src/core/hle/kernel/scheduler.cpp index b5ffa5418..86f1421bf 100644 --- a/src/core/hle/kernel/scheduler.cpp +++ b/src/core/hle/kernel/scheduler.cpp @@ -125,7 +125,7 @@ bool GlobalScheduler::YieldThreadAndBalanceLoad(Thread* yielding_thread) { scheduled_queue[core_id].yield(priority); std::array<Thread*, Core::Hardware::NUM_CPU_CORES> current_threads; - for (u32 i = 0; i < Core::Hardware::NUM_CPU_CORES; i++) { + for (std::size_t i = 0; i < current_threads.size(); i++) { current_threads[i] = scheduled_queue[i].empty() ? nullptr : scheduled_queue[i].front(); } @@ -178,7 +178,7 @@ bool GlobalScheduler::YieldThreadAndWaitForLoadBalancing(Thread* yielding_thread if (scheduled_queue[core_id].empty()) { // Here, "current_threads" is calculated after the ""yield"", unlike yield -1 std::array<Thread*, Core::Hardware::NUM_CPU_CORES> current_threads; - for (u32 i = 0; i < Core::Hardware::NUM_CPU_CORES; i++) { + for (std::size_t i = 0; i < current_threads.size(); i++) { current_threads[i] = scheduled_queue[i].empty() ? nullptr : scheduled_queue[i].front(); } for (auto& thread : suggested_queue[core_id]) { |