diff options
author | Lioncash <mathew1800@gmail.com> | 2019-10-28 03:39:20 +0100 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2019-10-28 04:35:50 +0100 |
commit | 6c8f28813c5ad9c3636638851a752ff5d33155f3 (patch) | |
tree | 7aef0214a4b7acd7388d4a8902c3997b1bcef763 /src | |
parent | scheduler: Silence sign conversion warnings (diff) | |
download | yuzu-6c8f28813c5ad9c3636638851a752ff5d33155f3.tar yuzu-6c8f28813c5ad9c3636638851a752ff5d33155f3.tar.gz yuzu-6c8f28813c5ad9c3636638851a752ff5d33155f3.tar.bz2 yuzu-6c8f28813c5ad9c3636638851a752ff5d33155f3.tar.lz yuzu-6c8f28813c5ad9c3636638851a752ff5d33155f3.tar.xz yuzu-6c8f28813c5ad9c3636638851a752ff5d33155f3.tar.zst yuzu-6c8f28813c5ad9c3636638851a752ff5d33155f3.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/scheduler.cpp | 8 | ||||
-rw-r--r-- | src/core/hle/kernel/scheduler.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/core/hle/kernel/scheduler.cpp b/src/core/hle/kernel/scheduler.cpp index 9a38fa50c..0e2dbf13e 100644 --- a/src/core/hle/kernel/scheduler.cpp +++ b/src/core/hle/kernel/scheduler.cpp @@ -107,11 +107,10 @@ bool GlobalScheduler::YieldThread(Thread* yielding_thread) { const u32 priority = yielding_thread->GetPriority(); // Yield the thread - ASSERT_MSG(yielding_thread == scheduled_queue[core_id].front(priority), - "Thread yielding without being in front"); + const Thread* const winner = scheduled_queue[core_id].front(priority); + ASSERT_MSG(yielding_thread == winner, "Thread yielding without being in front"); scheduled_queue[core_id].yield(priority); - Thread* winner = scheduled_queue[core_id].front(priority); return AskForReselectionOrMarkRedundant(yielding_thread, winner); } @@ -339,7 +338,8 @@ void GlobalScheduler::TransferToCore(u32 priority, s32 destination_core, Thread* } } -bool GlobalScheduler::AskForReselectionOrMarkRedundant(Thread* current_thread, Thread* winner) { +bool GlobalScheduler::AskForReselectionOrMarkRedundant(Thread* current_thread, + const Thread* winner) { if (current_thread == winner) { current_thread->IncrementYieldCount(); return true; diff --git a/src/core/hle/kernel/scheduler.h b/src/core/hle/kernel/scheduler.h index 74feecc06..f2d6311b8 100644 --- a/src/core/hle/kernel/scheduler.h +++ b/src/core/hle/kernel/scheduler.h @@ -145,7 +145,7 @@ public: void Shutdown(); private: - bool AskForReselectionOrMarkRedundant(Thread* current_thread, Thread* winner); + bool AskForReselectionOrMarkRedundant(Thread* current_thread, const Thread* winner); static constexpr u32 min_regular_priority = 2; std::array<Common::MultiLevelQueue<Thread*, THREADPRIO_COUNT>, NUM_CPU_CORES> scheduled_queue; |