Skip to content
Snippets Groups Projects
Unverified Commit 6ddf8f34 authored by Lioncash's avatar Lioncash
Browse files

kernel/mutex: Amend behavior of TransferMutexOwnership()

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

The behavior with the reference was incorrect and would cause some games
to fail to boot.
parent e6ee31a8
No related branches found
No related tags found
No related merge requests found
...@@ -47,7 +47,7 @@ static std::pair<SharedPtr<Thread>, u32> GetHighestPriorityMutexWaitingThread( ...@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment