diff options
Diffstat (limited to 'src/core/hle/kernel/thread.cpp')
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index eda56c31c..d97323255 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -215,7 +215,10 @@ VAddr Thread::GetCommandBufferAddress() const { | |||
| 215 | void Thread::SetState(ThreadState state) { | 215 | void Thread::SetState(ThreadState state) { |
| 216 | KScopedSchedulerLock sl(kernel); | 216 | KScopedSchedulerLock sl(kernel); |
| 217 | 217 | ||
| 218 | SetMutexWaitAddressForDebugging(0); | 218 | // Clear debugging state |
| 219 | SetMutexWaitAddressForDebugging({}); | ||
| 220 | SetWaitReasonForDebugging({}); | ||
| 221 | |||
| 219 | const ThreadState old_state = thread_state; | 222 | const ThreadState old_state = thread_state; |
| 220 | thread_state = | 223 | thread_state = |
| 221 | static_cast<ThreadState>((old_state & ~ThreadState::Mask) | (state & ThreadState::Mask)); | 224 | static_cast<ThreadState>((old_state & ~ThreadState::Mask) | (state & ThreadState::Mask)); |
| @@ -386,6 +389,7 @@ ResultCode Thread::Sleep(s64 nanoseconds) { | |||
| 386 | { | 389 | { |
| 387 | KScopedSchedulerLockAndSleep lock(kernel, event_handle, this, nanoseconds); | 390 | KScopedSchedulerLockAndSleep lock(kernel, event_handle, this, nanoseconds); |
| 388 | SetState(ThreadState::Waiting); | 391 | SetState(ThreadState::Waiting); |
| 392 | SetWaitReasonForDebugging(ThreadWaitReasonForDebugging::Sleep); | ||
| 389 | } | 393 | } |
| 390 | 394 | ||
| 391 | if (event_handle != InvalidHandle) { | 395 | if (event_handle != InvalidHandle) { |