svc: Avoid performance-degrading unnecessary reschedule

This commit is contained in:
Zach Hilman 2018-12-02 00:44:40 -05:00
parent 820d81b9a5
commit 3476830b26
2 changed files with 6 additions and 8 deletions

View file

@ -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;