فهرست منبع

Merge pull request #1447 from lioncash/mutex

kernel/mutex: Amend behavior of TransferMutexOwnership()
bunnei 7 سال پیش
والد
کامیت
095c8d999b
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      src/core/hle/kernel/mutex.cpp

+ 1 - 1
src/core/hle/kernel/mutex.cpp

@@ -47,7 +47,7 @@ static std::pair<SharedPtr<Thread>, u32> GetHighestPriorityMutexWaitingThread(
 /// Update the mutex owner field of all threads waiting on the mutex to point to the new owner.
 /// Update the mutex owner field of all threads waiting on the mutex to point to the new owner.
 static void TransferMutexOwnership(VAddr mutex_addr, SharedPtr<Thread> current_thread,
 static void TransferMutexOwnership(VAddr mutex_addr, SharedPtr<Thread> current_thread,
                                    SharedPtr<Thread> new_owner) {
                                    SharedPtr<Thread> new_owner) {
-    const auto& threads = current_thread->GetMutexWaitingThreads();
+    const auto threads = current_thread->GetMutexWaitingThreads();
     for (const auto& thread : threads) {
     for (const auto& thread : threads) {
         if (thread->GetMutexWaitAddress() != mutex_addr)
         if (thread->GetMutexWaitAddress() != mutex_addr)
             continue;
             continue;