diff options
author | Liam <byteslice@airmail.cc> | 2023-03-08 02:48:46 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2023-03-08 02:51:29 +0100 |
commit | 1776448df2a023f6735b69e27b72664e02f448ee (patch) | |
tree | 51af858c5e60d432db36d876f1d791aded1115c9 /src/core/hle/kernel/k_thread.cpp | |
parent | Merge pull request #9889 from Morph1984/time-is-ticking (diff) | |
download | yuzu-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_thread.cpp')
-rw-r--r-- | src/core/hle/kernel/k_thread.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/hle/kernel/k_thread.cpp b/src/core/hle/kernel/k_thread.cpp index 8c403f5fd..96b90ffef 100644 --- a/src/core/hle/kernel/k_thread.cpp +++ b/src/core/hle/kernel/k_thread.cpp @@ -1268,9 +1268,10 @@ Result KThread::Sleep(s64 timeout) { ASSERT(timeout > 0); ThreadQueueImplForKThreadSleep wait_queue_(kernel); + KHardwareTimer* timer{}; { // Setup the scheduling lock and sleep. - KScopedSchedulerLockAndSleep slp(kernel, this, timeout); + KScopedSchedulerLockAndSleep slp(kernel, std::addressof(timer), this, timeout); // Check if the thread should terminate. if (this->IsTerminationRequested()) { @@ -1279,6 +1280,7 @@ Result KThread::Sleep(s64 timeout) { } // Wait for the sleep to end. + wait_queue_.SetHardwareTimer(timer); this->BeginWait(std::addressof(wait_queue_)); SetWaitReasonForDebugging(ThreadWaitReasonForDebugging::Sleep); } |