forked from ShuriZma/suyu
1
0
Fork 0

mutex: Pass SharedPtr to GetHighestPriorityMutexWaitingThread() by reference

The pointed to thread's members are simply observed in this case, so we
don't need to copy it here.
This commit is contained in:
Lioncash 2018-07-23 22:54:32 -04:00
parent f6657bc8d7
commit 42b5158c96
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ namespace Kernel {
/// Returns the number of threads that are waiting for a mutex, and the highest priority one among /// Returns the number of threads that are waiting for a mutex, and the highest priority one among
/// those. /// those.
static std::pair<SharedPtr<Thread>, u32> GetHighestPriorityMutexWaitingThread( static std::pair<SharedPtr<Thread>, u32> GetHighestPriorityMutexWaitingThread(
SharedPtr<Thread> current_thread, VAddr mutex_addr) { const SharedPtr<Thread>& current_thread, VAddr mutex_addr) {
SharedPtr<Thread> highest_priority_thread; SharedPtr<Thread> highest_priority_thread;
u32 num_waiters = 0; u32 num_waiters = 0;