diff options
Diffstat (limited to 'src/core/hle/kernel/kernel.cpp')
| -rw-r--r-- | src/core/hle/kernel/kernel.cpp | 6 |
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() { | |||
| 42 | return next_thread.get(); | 42 | return next_thread.get(); |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | void WaitObject::ReleaseAllWaitingThreads() { | 45 | void WaitObject::WakeupAllWaitingThreads() { |
| 46 | auto waiting_threads_copy = waiting_threads; | 46 | auto waiting_threads_copy = waiting_threads; |
| 47 | 47 | ||
| 48 | // We use a copy because ReleaseWaitObject will remove the thread from this object's | ||
| 49 | // waiting_threads list | ||
| 48 | for (auto thread : waiting_threads_copy) | 50 | for (auto thread : waiting_threads_copy) |
| 49 | thread->ReleaseWaitObject(this); | 51 | thread->ReleaseWaitObject(this); |
| 50 | 52 | ||
| 51 | waiting_threads.clear(); | 53 | _assert_msg_(Kernel, waiting_threads.empty(), "failed to awaken all waiting threads!"); |
| 52 | } | 54 | } |
| 53 | 55 | ||
| 54 | HandleTable::HandleTable() { | 56 | HandleTable::HandleTable() { |