summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/kernel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/kernel/kernel.cpp')
-rw-r--r--src/core/hle/kernel/kernel.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp
index be3495412..57e0e8df7 100644
--- a/src/core/hle/kernel/kernel.cpp
+++ b/src/core/hle/kernel/kernel.cpp
@@ -42,13 +42,15 @@ Thread* WaitObject::ReleaseNextThread() {
return next_thread.get();
}
-void WaitObject::ReleaseAllWaitingThreads() {
+void WaitObject::WakeupAllWaitingThreads() {
auto waiting_threads_copy = waiting_threads;
+ // We use a copy because ReleaseWaitObject will remove the thread from this object's
+ // waiting_threads list
for (auto thread : waiting_threads_copy)
thread->ReleaseWaitObject(this);
- waiting_threads.clear();
+ _assert_msg_(Kernel, waiting_threads.empty(), "failed to awaken all waiting threads!");
}
HandleTable::HandleTable() {