From 1776448df2a023f6735b69e27b72664e02f448ee Mon Sep 17 00:00:00 2001 From: Liam Date: Tue, 7 Mar 2023 20:48:46 -0500 Subject: kernel: add timer pointer to KThreadQueue --- src/core/hle/kernel/k_light_condition_variable.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/core/hle/kernel/k_light_condition_variable.cpp') diff --git a/src/core/hle/kernel/k_light_condition_variable.cpp b/src/core/hle/kernel/k_light_condition_variable.cpp index cade99cfd..8fce2bc71 100644 --- a/src/core/hle/kernel/k_light_condition_variable.cpp +++ b/src/core/hle/kernel/k_light_condition_variable.cpp @@ -40,13 +40,14 @@ private: void KLightConditionVariable::Wait(KLightLock* lock, s64 timeout, bool allow_terminating_thread) { // Create thread queue. KThread* owner = GetCurrentThreadPointer(kernel); + KHardwareTimer* timer{}; ThreadQueueImplForKLightConditionVariable wait_queue(kernel, std::addressof(wait_list), allow_terminating_thread); // Sleep the thread. { - KScopedSchedulerLockAndSleep lk(kernel, owner, timeout); + KScopedSchedulerLockAndSleep lk(kernel, std::addressof(timer), owner, timeout); if (!allow_terminating_thread && owner->IsTerminationRequested()) { lk.CancelSleep(); @@ -59,6 +60,7 @@ void KLightConditionVariable::Wait(KLightLock* lock, s64 timeout, bool allow_ter wait_list.push_back(*owner); // Begin waiting. + wait_queue.SetHardwareTimer(timer); owner->BeginWait(std::addressof(wait_queue)); } -- cgit v1.2.3