diff options
Diffstat (limited to 'Kernel/Time/HardwareTimer.h')
-rw-r--r-- | Kernel/Time/HardwareTimer.h | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/Kernel/Time/HardwareTimer.h b/Kernel/Time/HardwareTimer.h index b442d377f8..ce555075e3 100644 --- a/Kernel/Time/HardwareTimer.h +++ b/Kernel/Time/HardwareTimer.h @@ -92,10 +92,14 @@ protected: { } - virtual void handle_irq(const RegisterState& regs) override + virtual bool handle_irq(const RegisterState& regs) override { - if (m_callback) + // Note: if we have an IRQ on this line, it's going to be the timer always + if (m_callback) { m_callback(regs); + return true; + } + return false; } u64 m_frequency { OPTIMAL_TICKS_PER_SECOND_RATE }; @@ -142,10 +146,14 @@ protected: { } - virtual void handle_interrupt(const RegisterState& regs) override + virtual bool handle_interrupt(const RegisterState& regs) override { - if (m_callback) + // Note: if we have an IRQ on this line, it's going to be the timer always + if (m_callback) { m_callback(regs); + return true; + } + return false; } u64 m_frequency { OPTIMAL_TICKS_PER_SECOND_RATE }; |