diff options
| author | Liam <byteslice@airmail.cc> | 2023-03-07 20:48:46 -0500 |
|---|---|---|
| committer | Liam <byteslice@airmail.cc> | 2023-03-07 20:51:29 -0500 |
| commit | 46a6277709f4c9c33a7962bae800b9c83166d8f9 (patch) | |
| tree | 51af858c5e60d432db36d876f1d791aded1115c9 /src/core/hle/kernel/k_synchronization_object.cpp | |
| parent | 4bdcafda5807c2882b57bd0c790c798621f98f95 (diff) | |
kernel: add timer pointer to KThreadQueue
Diffstat (limited to 'src/core/hle/kernel/k_synchronization_object.cpp')
| -rw-r--r-- | src/core/hle/kernel/k_synchronization_object.cpp | 4 |
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 802dca0466..40fd0c0388 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); } |
