mirror of
https://git.citron-emu.org/citron/emulator
synced 2025-12-20 11:03:56 +00:00
svc: Avoid performance-degrading unnecessary reschedule
This commit is contained in:
@@ -207,8 +207,8 @@ void Scheduler::YieldWithoutLoadBalancing(Thread* thread) {
|
||||
ASSERT(thread->GetPriority() < THREADPRIO_COUNT);
|
||||
|
||||
// Yield this thread
|
||||
MoveThreadToBackOfPriorityQueue(thread, thread->GetPriority());
|
||||
Reschedule();
|
||||
MoveThreadToBackOfPriorityQueue(thread, thread->GetPriority());
|
||||
}
|
||||
|
||||
void Scheduler::YieldWithLoadBalancing(Thread* thread) {
|
||||
@@ -223,6 +223,7 @@ void Scheduler::YieldWithLoadBalancing(Thread* thread) {
|
||||
ASSERT(priority < THREADPRIO_COUNT);
|
||||
|
||||
// Reschedule thread to end of queue.
|
||||
Reschedule();
|
||||
MoveThreadToBackOfPriorityQueue(thread, priority);
|
||||
|
||||
Thread* suggested_thread = nullptr;
|
||||
|
||||
Reference in New Issue
Block a user