mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:38:10 +00:00
Kernel: Rename HardwareTimer::m_function_to_call => m_callback
This commit is contained in:
parent
1e89f7d64e
commit
4b1f056e3a
2 changed files with 10 additions and 5 deletions
|
@ -31,23 +31,26 @@ namespace Kernel {
|
|||
|
||||
HardwareTimer::HardwareTimer(u8 irq_number, Function<void(const RegisterState&)> callback)
|
||||
: IRQHandler(irq_number)
|
||||
, m_function_to_call(move(callback))
|
||||
, m_callback(move(callback))
|
||||
{
|
||||
}
|
||||
|
||||
void HardwareTimer::handle_irq(const RegisterState& regs)
|
||||
{
|
||||
m_function_to_call(regs);
|
||||
m_callback(regs);
|
||||
}
|
||||
|
||||
const char* HardwareTimer::purpose() const
|
||||
{
|
||||
if (TimeManagement::the().is_system_timer(*this))
|
||||
return "System Timer";
|
||||
return model();
|
||||
}
|
||||
|
||||
void HardwareTimer::change_function(Function<void(const RegisterState&)> callback)
|
||||
{
|
||||
disable_irq();
|
||||
m_function_to_call = move(callback);
|
||||
m_callback = move(callback);
|
||||
enable_irq();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue