summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/k_synchronization_object.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_synchronization_object.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 '')
-rw-r--r--src/core/hle/kernel/k_synchronization_object.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/hle/kernel/k_synchronization_object.cpp b/src/core/hle/kernel/k_synchronization_object.cpp
index 802dca046..40fd0c038 100644
--- a/src/core/hle/kernel/k_synchronization_object.cpp
+++ b/src/core/hle/kernel/k_synchronization_object.cpp
@@ -79,12 +79,13 @@ Result KSynchronizationObject::Wait(KernelCore& kernel_ctx, s32* out_index,
// Prepare for wait.
KThread* thread = GetCurrentThreadPointer(kernel_ctx);
+ KHardwareTimer* timer{};
ThreadQueueImplForKSynchronizationObjectWait wait_queue(kernel_ctx, objects,
thread_nodes.data(), num_objects);
{
// Setup the scheduling lock and sleep.
- KScopedSchedulerLockAndSleep slp(kernel_ctx, thread, timeout);
+ KScopedSchedulerLockAndSleep slp(kernel_ctx, std::addressof(timer), thread, timeout);
// Check if the thread should terminate.
if (thread->IsTerminationRequested()) {
@@ -131,6 +132,7 @@ Result KSynchronizationObject::Wait(KernelCore& kernel_ctx, s32* out_index,
thread->SetSyncedIndex(-1);
// Wait for an object to be signaled.
+ wait_queue.SetHardwareTimer(timer);
thread->BeginWait(std::addressof(wait_queue));
thread->SetWaitReasonForDebugging(ThreadWaitReasonForDebugging::Synchronization);
}