summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/scheduler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/kernel/scheduler.cpp')
-rw-r--r--src/core/hle/kernel/scheduler.cpp8
1 files changed, 4 insertions, 4 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) {
107 const u32 priority = yielding_thread->GetPriority(); 107 const u32 priority = yielding_thread->GetPriority();
108 108
109 // Yield the thread 109 // Yield the thread
110 ASSERT_MSG(yielding_thread == scheduled_queue[core_id].front(priority), 110 const Thread* const winner = scheduled_queue[core_id].front(priority);
111 "Thread yielding without being in front"); 111 ASSERT_MSG(yielding_thread == winner, "Thread yielding without being in front");
112 scheduled_queue[core_id].yield(priority); 112 scheduled_queue[core_id].yield(priority);
113 113
114 Thread* winner = scheduled_queue[core_id].front(priority);
115 return AskForReselectionOrMarkRedundant(yielding_thread, winner); 114 return AskForReselectionOrMarkRedundant(yielding_thread, winner);
116} 115}
117 116
@@ -339,7 +338,8 @@ void GlobalScheduler::TransferToCore(u32 priority, s32 destination_core, Thread*
339 } 338 }
340} 339}
341 340
342bool GlobalScheduler::AskForReselectionOrMarkRedundant(Thread* current_thread, Thread* winner) { 341bool GlobalScheduler::AskForReselectionOrMarkRedundant(Thread* current_thread,
342 const Thread* winner) {
343 if (current_thread == winner) { 343 if (current_thread == winner) {
344 current_thread->IncrementYieldCount(); 344 current_thread->IncrementYieldCount();
345 return true; 345 return true;