kernel/mutex: Amend behavior of TransferMutexOwnership()

This was the result of a typo accidentally introduced in
e51d715700. This restores the previous
correct behavior.

The behavior with the reference was incorrect and would cause some games
to fail to boot.
This commit is contained in:
Lioncash 2018-10-06 01:11:56 -04:00
parent e6ee31a8e9
commit 6ddf8f34db
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -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.
static void TransferMutexOwnership(VAddr mutex_addr, SharedPtr<Thread> current_thread,
SharedPtr<Thread> new_owner) {
const auto& threads = current_thread->GetMutexWaitingThreads();
const auto threads = current_thread->GetMutexWaitingThreads();
for (const auto& thread : threads) {
if (thread->GetMutexWaitAddress() != mutex_addr)
continue;