diff options
| author | 2015-01-18 13:25:51 -0500 | |
|---|---|---|
| committer | 2015-01-21 20:47:38 -0500 | |
| commit | e5a9f1c64483e01b7856c581ae5685d0c5ad88dc (patch) | |
| tree | 6ab483afc7aa00bdcff51f0d6b7015b9edd5e5bf /src/core/hle/kernel/kernel.cpp | |
| parent | WaitSynchronizationN: Improved comments (diff) | |
| download | yuzu-e5a9f1c64483e01b7856c581ae5685d0c5ad88dc.tar.gz yuzu-e5a9f1c64483e01b7856c581ae5685d0c5ad88dc.tar.xz yuzu-e5a9f1c64483e01b7856c581ae5685d0c5ad88dc.zip | |
Kernel: Get rid of WaitTypes and simplify lots of code, removing hacks.
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() { |