diff options
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/k_condition_variable.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/core/hle/kernel/k_condition_variable.cpp b/src/core/hle/kernel/k_condition_variable.cpp index 930f78974..72565af05 100644 --- a/src/core/hle/kernel/k_condition_variable.cpp +++ b/src/core/hle/kernel/k_condition_variable.cpp @@ -185,11 +185,11 @@ KThread* KConditionVariable::SignalImpl(KThread* thread) { thread->Wakeup(); } else { // Get the previous owner. - KThread* owner_thread = - kernel.CurrentProcess()->GetHandleTable() - .GetObjectWithoutPseudoHandle<KThread>( - static_cast<Handle>(prev_tag & ~Svc::HandleWaitMask)) - .ReleasePointerUnsafe(); + KThread* owner_thread = kernel.CurrentProcess() + ->GetHandleTable() + .GetObjectWithoutPseudoHandle<KThread>( + static_cast<Handle>(prev_tag & ~Svc::HandleWaitMask)) + .ReleasePointerUnsafe(); if (owner_thread) { // Add the thread as a waiter on the owner. @@ -214,7 +214,7 @@ void KConditionVariable::Signal(u64 cv_key, s32 count) { // Prepare for signaling. constexpr int MaxThreads = 16; - KLinkedList<KThread> thread_list; + KLinkedList<KThread> thread_list{kernel}; std::array<KThread*, MaxThreads> thread_array; s32 num_to_close{}; @@ -254,7 +254,8 @@ void KConditionVariable::Signal(u64 cv_key, s32 count) { } // Close threads in the list. - for (auto it = thread_list.begin(); it != thread_list.end(); it = thread_list.erase(it)) { + for (auto it = thread_list.begin(); it != thread_list.end(); + it = thread_list.erase(kernel, it)) { (*it).Close(); } } |