Explorar o código

hle: kernel: k_scheduler: Cleanup OnThreadPriorityChanged.

bunnei %!s(int64=5) %!d(string=hai) anos
pai
achega
f12701b303
Modificáronse 2 ficheiros con 3 adicións e 6 borrados
  1. 2 4
      src/core/hle/kernel/k_scheduler.cpp
  2. 1 2
      src/core/hle/kernel/k_scheduler.h

+ 2 - 4
src/core/hle/kernel/k_scheduler.cpp

@@ -203,9 +203,7 @@ void KScheduler::OnThreadStateChanged(KernelCore& kernel, Thread* thread, Thread
     }
     }
 }
 }
 
 
-void KScheduler::OnThreadPriorityChanged(KernelCore& kernel, Thread* thread, Thread* current_thread,
-                                         s32 old_priority) {
-
+void KScheduler::OnThreadPriorityChanged(KernelCore& kernel, Thread* thread, s32 old_priority) {
     ASSERT(kernel.GlobalSchedulerContext().IsLocked());
     ASSERT(kernel.GlobalSchedulerContext().IsLocked());
 
 
     // If the thread is runnable, we want to change its priority in the queue.
     // If the thread is runnable, we want to change its priority in the queue.
@@ -292,7 +290,7 @@ void KScheduler::RotateScheduledQueue(s32 core_id, s32 priority) {
 
 
         // If the best thread we can choose has a priority the same or worse than ours, try to
         // If the best thread we can choose has a priority the same or worse than ours, try to
         // migrate a higher priority thread.
         // migrate a higher priority thread.
-        if (best_thread != nullptr && best_thread->GetPriority() >= static_cast<u32>(priority)) {
+        if (best_thread != nullptr && best_thread->GetPriority() >= priority) {
             Thread* suggested = priority_queue.GetSuggestedFront(core_id);
             Thread* suggested = priority_queue.GetSuggestedFront(core_id);
             while (suggested != nullptr) {
             while (suggested != nullptr) {
                 // If the suggestion's priority is the same as ours, don't bother.
                 // If the suggestion's priority is the same as ours, don't bother.

+ 1 - 2
src/core/hle/kernel/k_scheduler.h

@@ -103,8 +103,7 @@ public:
     static void OnThreadStateChanged(KernelCore& kernel, Thread* thread, ThreadState old_state);
     static void OnThreadStateChanged(KernelCore& kernel, Thread* thread, ThreadState old_state);
 
 
     /// Notify the scheduler a thread's priority has changed.
     /// Notify the scheduler a thread's priority has changed.
-    static void OnThreadPriorityChanged(KernelCore& kernel, Thread* thread, Thread* current_thread,
-                                        s32 old_priority);
+    static void OnThreadPriorityChanged(KernelCore& kernel, Thread* thread, s32 old_priority);
 
 
     /// Notify the scheduler a thread's core and/or affinity mask has changed.
     /// Notify the scheduler a thread's core and/or affinity mask has changed.
     static void OnThreadAffinityMaskChanged(KernelCore& kernel, Thread* thread,
     static void OnThreadAffinityMaskChanged(KernelCore& kernel, Thread* thread,