aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/k_thread_queue.cpp
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-03-07 20:48:46 -0500
committerLiam <byteslice@airmail.cc>2023-03-07 20:51:29 -0500
commit46a6277709f4c9c33a7962bae800b9c83166d8f9 (patch)
tree51af858c5e60d432db36d876f1d791aded1115c9 /src/core/hle/kernel/k_thread_queue.cpp
parent4bdcafda5807c2882b57bd0c790c798621f98f95 (diff)
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.cpp8
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);
}
}