summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/k_light_condition_variable.cpp
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-03-08 02:48:46 +0100
committerLiam <byteslice@airmail.cc>2023-03-08 02:51:29 +0100
commit1776448df2a023f6735b69e27b72664e02f448ee (patch)
tree51af858c5e60d432db36d876f1d791aded1115c9 /src/core/hle/kernel/k_light_condition_variable.cpp
parentMerge pull request #9889 from Morph1984/time-is-ticking (diff)
downloadyuzu-1776448df2a023f6735b69e27b72664e02f448ee.tar
yuzu-1776448df2a023f6735b69e27b72664e02f448ee.tar.gz
yuzu-1776448df2a023f6735b69e27b72664e02f448ee.tar.bz2
yuzu-1776448df2a023f6735b69e27b72664e02f448ee.tar.lz
yuzu-1776448df2a023f6735b69e27b72664e02f448ee.tar.xz
yuzu-1776448df2a023f6735b69e27b72664e02f448ee.tar.zst
yuzu-1776448df2a023f6735b69e27b72664e02f448ee.zip
Diffstat (limited to 'src/core/hle/kernel/k_light_condition_variable.cpp')
-rw-r--r--src/core/hle/kernel/k_light_condition_variable.cpp4
1 files changed, 3 insertions, 1 deletions
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));
}