3
0
Fork 0
forked from suyu/suyu

Merge pull request #1447 from lioncash/mutex

kernel/mutex: Amend behavior of TransferMutexOwnership()
This commit is contained in:
bunnei 2018-10-06 01:38:34 -04:00 committed by GitHub
commit 095c8d999b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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;