1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 14:15:07 +00:00

Kernel: Remove "stale callback" concept from time management

If a hardware timer doesn't have a callback registered, it's now simply
represented by a null m_callback.
This commit is contained in:
Andreas Kling 2020-04-16 18:20:27 +02:00
parent 4b1f056e3a
commit b035267afa
6 changed files with 7 additions and 11 deletions

View file

@ -37,7 +37,8 @@ HardwareTimer::HardwareTimer(u8 irq_number, Function<void(const RegisterState&)>
void HardwareTimer::handle_irq(const RegisterState& regs)
{
m_callback(regs);
if (!m_callback)
m_callback(regs);
}
const char* HardwareTimer::purpose() const