aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/k_condition_variable.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-01-10 14:29:02 -0800
committerbunnei <bunneidev@gmail.com>2021-01-11 14:23:17 -0800
commit03dfc8d8e74910d447b755e00848a623ec65cd93 (patch)
tree56a80760bd0ba8ecd85dc8d9f09fb9e2068c91d4 /src/core/hle/kernel/k_condition_variable.cpp
parent81c1bfafeac88d0651d146056e9008c22bea87d2 (diff)
hle: kernel: thread: Preserve thread wait reason for debugging only.
- This is decoupled from core functionality and used for debugging only.
Diffstat (limited to 'src/core/hle/kernel/k_condition_variable.cpp')
-rw-r--r--src/core/hle/kernel/k_condition_variable.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/core/hle/kernel/k_condition_variable.cpp b/src/core/hle/kernel/k_condition_variable.cpp
index ef5c17409..49a068310 100644
--- a/src/core/hle/kernel/k_condition_variable.cpp
+++ b/src/core/hle/kernel/k_condition_variable.cpp
@@ -133,6 +133,7 @@ ResultCode KConditionVariable::WaitForAddress(Handle handle, VAddr addr, u32 val
cur_thread->SetAddressKey(addr, value);
owner_thread->AddWaiter(cur_thread);
cur_thread->SetState(ThreadState::Waiting);
+ cur_thread->SetWaitReasonForDebugging(ThreadWaitReasonForDebugging::ConditionVar);
cur_thread->SetMutexWaitAddressForDebugging(addr);
}
}
@@ -315,6 +316,7 @@ ResultCode KConditionVariable::Wait(VAddr addr, u64 key, u32 value, s64 timeout)
// If the timeout is non-zero, set the thread as waiting.
if (timeout != 0) {
cur_thread->SetState(ThreadState::Waiting);
+ cur_thread->SetWaitReasonForDebugging(ThreadWaitReasonForDebugging::ConditionVar);
cur_thread->SetMutexWaitAddressForDebugging(addr);
}
}