summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/kernel.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-01-18 19:25:51 +0100
committerbunnei <bunneidev@gmail.com>2015-01-22 02:47:38 +0100
commite5a9f1c64483e01b7856c581ae5685d0c5ad88dc (patch)
tree6ab483afc7aa00bdcff51f0d6b7015b9edd5e5bf /src/core/hle/kernel/kernel.cpp
parentWaitSynchronizationN: Improved comments (diff)
downloadyuzu-e5a9f1c64483e01b7856c581ae5685d0c5ad88dc.tar
yuzu-e5a9f1c64483e01b7856c581ae5685d0c5ad88dc.tar.gz
yuzu-e5a9f1c64483e01b7856c581ae5685d0c5ad88dc.tar.bz2
yuzu-e5a9f1c64483e01b7856c581ae5685d0c5ad88dc.tar.lz
yuzu-e5a9f1c64483e01b7856c581ae5685d0c5ad88dc.tar.xz
yuzu-e5a9f1c64483e01b7856c581ae5685d0c5ad88dc.tar.zst
yuzu-e5a9f1c64483e01b7856c581ae5685d0c5ad88dc.zip
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() {