diff options
| author | 2019-04-24 22:56:08 -0400 | |
|---|---|---|
| committer | 2019-04-24 22:56:08 -0400 | |
| commit | 78574e7a470a29e7ef0c1cc062d334d133c60830 (patch) | |
| tree | 9027d3466f0f588c5f14af0e23c7f7b128c79330 /src/core/hle/kernel/thread.cpp | |
| parent | Merge pull request #2424 from FernandoS27/compat (diff) | |
| parent | kernel/thread: Unify wait synchronization types (diff) | |
| download | yuzu-78574e7a470a29e7ef0c1cc062d334d133c60830.tar.gz yuzu-78574e7a470a29e7ef0c1cc062d334d133c60830.tar.xz yuzu-78574e7a470a29e7ef0c1cc062d334d133c60830.zip | |
Merge pull request #2416 from lioncash/wait
kernel/svc: Clean up wait synchronization related functionality
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index ca52267b2..2abf9efca 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -101,8 +101,7 @@ void Thread::ResumeFromWait() { | |||
| 101 | ASSERT_MSG(wait_objects.empty(), "Thread is waking up while waiting for objects"); | 101 | ASSERT_MSG(wait_objects.empty(), "Thread is waking up while waiting for objects"); |
| 102 | 102 | ||
| 103 | switch (status) { | 103 | switch (status) { |
| 104 | case ThreadStatus::WaitSynchAll: | 104 | case ThreadStatus::WaitSynch: |
| 105 | case ThreadStatus::WaitSynchAny: | ||
| 106 | case ThreadStatus::WaitHLEEvent: | 105 | case ThreadStatus::WaitHLEEvent: |
| 107 | case ThreadStatus::WaitSleep: | 106 | case ThreadStatus::WaitSleep: |
| 108 | case ThreadStatus::WaitIPC: | 107 | case ThreadStatus::WaitIPC: |
| @@ -142,6 +141,12 @@ void Thread::ResumeFromWait() { | |||
| 142 | ChangeScheduler(); | 141 | ChangeScheduler(); |
| 143 | } | 142 | } |
| 144 | 143 | ||
| 144 | void Thread::CancelWait() { | ||
| 145 | ASSERT(GetStatus() == ThreadStatus::WaitSynch); | ||
| 146 | SetWaitSynchronizationResult(ERR_SYNCHRONIZATION_CANCELED); | ||
| 147 | ResumeFromWait(); | ||
| 148 | } | ||
| 149 | |||
| 145 | /** | 150 | /** |
| 146 | * Resets a thread context, making it ready to be scheduled and run by the CPU | 151 | * Resets a thread context, making it ready to be scheduled and run by the CPU |
| 147 | * @param context Thread context to reset | 152 | * @param context Thread context to reset |