mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-04 15:45:25 +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:
@@ -34,11 +34,11 @@ namespace Kernel {
|
||||
|
||||
NonnullRefPtr<HPETComparator> HPETComparator::create(u8 number, u8 irq, bool periodic_capable)
|
||||
{
|
||||
return adopt(*new HPETComparator(number, irq, periodic_capable, [](const RegisterState& regs) { TimeManagement::stale_function(regs); }));
|
||||
return adopt(*new HPETComparator(number, irq, periodic_capable));
|
||||
}
|
||||
|
||||
HPETComparator::HPETComparator(u8 number, u8 irq, bool periodic_capable, Function<void(const RegisterState&)> callback)
|
||||
: HardwareTimer(irq, move(callback))
|
||||
HPETComparator::HPETComparator(u8 number, u8 irq, bool periodic_capable)
|
||||
: HardwareTimer(irq)
|
||||
, m_periodic(false)
|
||||
, m_periodic_capable(periodic_capable)
|
||||
, m_comparator_number(number)
|
||||
|
||||
Reference in New Issue
Block a user