diff options
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index fb1751860..e8962a0d8 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -139,13 +139,14 @@ ResultCode Thread::Start() { | |||
| 139 | 139 | ||
| 140 | void Thread::CancelWait() { | 140 | void Thread::CancelWait() { |
| 141 | SchedulerLock lock(kernel); | 141 | SchedulerLock lock(kernel); |
| 142 | if (GetSchedulingStatus() != ThreadSchedStatus::Paused) { | 142 | if (GetSchedulingStatus() != ThreadSchedStatus::Paused || !is_waiting_on_sync) { |
| 143 | is_sync_cancelled = true; | 143 | is_sync_cancelled = true; |
| 144 | return; | 144 | return; |
| 145 | } | 145 | } |
| 146 | //TODO(Blinkhawk): Implement cancel of server session | ||
| 146 | is_sync_cancelled = false; | 147 | is_sync_cancelled = false; |
| 147 | SetSynchronizationResults(nullptr, ERR_SYNCHRONIZATION_CANCELED); | 148 | SetSynchronizationResults(nullptr, ERR_SYNCHRONIZATION_CANCELED); |
| 148 | ResumeFromWait(); | 149 | SetStatus(ThreadStatus::Ready); |
| 149 | } | 150 | } |
| 150 | 151 | ||
| 151 | static void ResetThreadContext32(Core::ARM_Interface::ThreadContext32& context, u32 stack_top, | 152 | static void ResetThreadContext32(Core::ARM_Interface::ThreadContext32& context, u32 stack_top, |