summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
authorGravatar bunnei2023-01-18 15:13:38 -0800
committerGravatar GitHub2023-01-18 15:13:38 -0800
commit413df0811d589fb147f24e29caab5285d62e1a6a (patch)
treefcd0e4cb6696dfc1964d3169a7db1a63348efdbf /src/core/hle/kernel
parentMerge pull request #9615 from merryhime/upsample-ob1 (diff)
parenttiming: wait for completion on unregister (diff)
downloadyuzu-413df0811d589fb147f24e29caab5285d62e1a6a.tar.gz
yuzu-413df0811d589fb147f24e29caab5285d62e1a6a.tar.xz
yuzu-413df0811d589fb147f24e29caab5285d62e1a6a.zip
Merge pull request #9619 from liamwhite/timing-spaghetti
timing: wait for completion on unregister
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r--src/core/hle/kernel/k_hardware_timer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/hle/kernel/k_hardware_timer.cpp b/src/core/hle/kernel/k_hardware_timer.cpp
index 6bba79ea0..4dcd53821 100644
--- a/src/core/hle/kernel/k_hardware_timer.cpp
+++ b/src/core/hle/kernel/k_hardware_timer.cpp
@@ -18,7 +18,8 @@ void KHardwareTimer::Initialize() {
18} 18}
19 19
20void KHardwareTimer::Finalize() { 20void KHardwareTimer::Finalize() {
21 this->DisableInterrupt(); 21 m_kernel.System().CoreTiming().UnscheduleEvent(m_event_type, reinterpret_cast<uintptr_t>(this));
22 m_wakeup_time = std::numeric_limits<s64>::max();
22 m_event_type.reset(); 23 m_event_type.reset();
23} 24}
24 25
@@ -59,7 +60,8 @@ void KHardwareTimer::EnableInterrupt(s64 wakeup_time) {
59} 60}
60 61
61void KHardwareTimer::DisableInterrupt() { 62void KHardwareTimer::DisableInterrupt() {
62 m_kernel.System().CoreTiming().UnscheduleEvent(m_event_type, reinterpret_cast<uintptr_t>(this)); 63 m_kernel.System().CoreTiming().UnscheduleEventWithoutWait(m_event_type,
64 reinterpret_cast<uintptr_t>(this));
63 m_wakeup_time = std::numeric_limits<s64>::max(); 65 m_wakeup_time = std::numeric_limits<s64>::max();
64} 66}
65 67