diff options
| author | bunnei <bunneidev@gmail.com> | 2019-04-24 22:56:08 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-04-24 22:56:08 -0400 |
| commit | 78574e7a470a29e7ef0c1cc062d334d133c60830 (patch) | |
| tree | 9027d3466f0f588c5f14af0e23c7f7b128c79330 /src/core/hle/kernel/thread.cpp | |
| parent | 94db649205baadd0f325be5a56766850fc7421c7 (diff) | |
| parent | c268ffd831bc8771585934e7e24da0f7e150936e (diff) | |
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() { ASSERT_MSG(wait_objects.empty(), "Thread is waking up while waiting for objects"); switch (status) { - case ThreadStatus::WaitSynchAll: - case ThreadStatus::WaitSynchAny: + case ThreadStatus::WaitSynch: case ThreadStatus::WaitHLEEvent: case ThreadStatus::WaitSleep: case ThreadStatus::WaitIPC: @@ -142,6 +141,12 @@ void Thread::ResumeFromWait() { ChangeScheduler(); } +void Thread::CancelWait() { + ASSERT(GetStatus() == ThreadStatus::WaitSynch); + SetWaitSynchronizationResult(ERR_SYNCHRONIZATION_CANCELED); + ResumeFromWait(); +} + /** * Resets a thread context, making it ready to be scheduled and run by the CPU * @param context Thread context to reset |
