diff options
| author | bunnei <bunneidev@gmail.com> | 2021-04-09 22:10:14 -0700 |
|---|---|---|
| committer | bunnei <bunneidev@gmail.com> | 2021-05-05 16:40:51 -0700 |
| commit | b6156e735cd78d4b7863491ae6bdc63e44404b73 (patch) | |
| tree | e1ec7753ea7c86223135e2f51b1b1f649af48b90 /src/core/hle/kernel/k_condition_variable.cpp | |
| parent | ab704acab80d17f9a8e34dcbb753d60de2a86f86 (diff) | |
hle: kernel: Move slab heap management to KernelCore.
Diffstat (limited to 'src/core/hle/kernel/k_condition_variable.cpp')
| -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(); } } |
