diff options
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index e6bb7c666..5fef3945b 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -139,12 +139,13 @@ ResultCode Thread::Start() { | |||
| 139 | } | 139 | } |
| 140 | 140 | ||
| 141 | void Thread::CancelWait() { | 141 | void Thread::CancelWait() { |
| 142 | SchedulerLock lock(kernel); | ||
| 142 | if (GetSchedulingStatus() != ThreadSchedStatus::Paused) { | 143 | if (GetSchedulingStatus() != ThreadSchedStatus::Paused) { |
| 143 | is_sync_cancelled = true; | 144 | is_sync_cancelled = true; |
| 144 | return; | 145 | return; |
| 145 | } | 146 | } |
| 146 | is_sync_cancelled = false; | 147 | is_sync_cancelled = false; |
| 147 | SetWaitSynchronizationResult(ERR_SYNCHRONIZATION_CANCELED); | 148 | SetSynchronizationResults(nullptr, ERR_SYNCHRONIZATION_CANCELED); |
| 148 | ResumeFromWait(); | 149 | ResumeFromWait(); |
| 149 | } | 150 | } |
| 150 | 151 | ||
| @@ -258,13 +259,16 @@ void Thread::SetPriority(u32 priority) { | |||
| 258 | } | 259 | } |
| 259 | 260 | ||
| 260 | void Thread::SetWaitSynchronizationResult(ResultCode result) { | 261 | void Thread::SetWaitSynchronizationResult(ResultCode result) { |
| 261 | context_32.cpu_registers[0] = result.raw; | 262 | UNREACHABLE(); |
| 262 | context_64.cpu_registers[0] = result.raw; | ||
| 263 | } | 263 | } |
| 264 | 264 | ||
| 265 | void Thread::SetWaitSynchronizationOutput(s32 output) { | 265 | void Thread::SetWaitSynchronizationOutput(s32 output) { |
| 266 | context_32.cpu_registers[1] = output; | 266 | UNREACHABLE(); |
| 267 | context_64.cpu_registers[1] = output; | 267 | } |
| 268 | |||
| 269 | void Thread::SetSynchronizationResults(SynchronizationObject* object, ResultCode result) { | ||
| 270 | signaling_object = object; | ||
| 271 | signaling_result = result; | ||
| 268 | } | 272 | } |
| 269 | 273 | ||
| 270 | s32 Thread::GetSynchronizationObjectIndex(std::shared_ptr<SynchronizationObject> object) const { | 274 | s32 Thread::GetSynchronizationObjectIndex(std::shared_ptr<SynchronizationObject> object) const { |