diff options
| author | liamwhite <liamwhite@users.noreply.github.com> | 2023-03-10 16:19:41 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-10 16:19:41 -0500 |
| commit | e70d58089730e57c55a8dc8e4a4d21bcca1cd765 (patch) | |
| tree | 2bdc9dcf0a110c0df5f0f4a78904bdcebe42a31f /src/core/hle/kernel/k_thread_queue.cpp | |
| parent | a15a1c385640a86e0060e3d5cdc3206f254a56a2 (diff) | |
| parent | 46a6277709f4c9c33a7962bae800b9c83166d8f9 (diff) | |
Merge pull request #9923 from liamwhite/kht
kernel: add timer pointer to KThreadQueue
Diffstat (limited to 'src/core/hle/kernel/k_thread_queue.cpp')
| -rw-r--r-- | src/core/hle/kernel/k_thread_queue.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/hle/kernel/k_thread_queue.cpp b/src/core/hle/kernel/k_thread_queue.cpp index 5f1dc97eb6..fe648447bc 100644 --- a/src/core/hle/kernel/k_thread_queue.cpp +++ b/src/core/hle/kernel/k_thread_queue.cpp @@ -22,7 +22,9 @@ void KThreadQueue::EndWait(KThread* waiting_thread, Result wait_result) { waiting_thread->ClearWaitQueue(); // Cancel the thread task. - kernel.HardwareTimer().CancelTask(waiting_thread); + if (m_hardware_timer != nullptr) { + m_hardware_timer->CancelTask(waiting_thread); + } } void KThreadQueue::CancelWait(KThread* waiting_thread, Result wait_result, bool cancel_timer_task) { @@ -36,8 +38,8 @@ void KThreadQueue::CancelWait(KThread* waiting_thread, Result wait_result, bool waiting_thread->ClearWaitQueue(); // Cancel the thread task. - if (cancel_timer_task) { - kernel.HardwareTimer().CancelTask(waiting_thread); + if (cancel_timer_task && m_hardware_timer != nullptr) { + m_hardware_timer->CancelTask(waiting_thread); } } |
