mirror of
https://github.com/RGBCube/serenity
synced 2025-05-22 16:55:09 +00:00
Kernel: Rename HardwareTimer::change_function() => set_callback()
Also make it non-virtual since nothing needs to override it.
This commit is contained in:
parent
b035267afa
commit
c891c87cb5
3 changed files with 5 additions and 4 deletions
|
@ -48,7 +48,7 @@ const char* HardwareTimer::purpose() const
|
||||||
return model();
|
return model();
|
||||||
}
|
}
|
||||||
|
|
||||||
void HardwareTimer::change_function(Function<void(const RegisterState&)> callback)
|
void HardwareTimer::set_callback(Function<void(const RegisterState&)> callback)
|
||||||
{
|
{
|
||||||
disable_irq();
|
disable_irq();
|
||||||
m_callback = move(callback);
|
m_callback = move(callback);
|
||||||
|
|
|
@ -48,7 +48,8 @@ public:
|
||||||
virtual const char* model() const = 0;
|
virtual const char* model() const = 0;
|
||||||
virtual const char* purpose() const override;
|
virtual const char* purpose() const override;
|
||||||
|
|
||||||
virtual void change_function(Function<void(const RegisterState&)>);
|
void set_callback(Function<void(const RegisterState&)>);
|
||||||
|
|
||||||
virtual size_t ticks_per_second() const = 0;
|
virtual size_t ticks_per_second() const = 0;
|
||||||
|
|
||||||
virtual bool is_periodic() const = 0;
|
virtual bool is_periodic() const = 0;
|
||||||
|
|
|
@ -190,10 +190,10 @@ bool TimeManagement::probe_and_set_non_legacy_hardware_timers()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_system_timer->change_function(Scheduler::timer_tick);
|
m_system_timer->set_callback(Scheduler::timer_tick);
|
||||||
dbg() << "Reset timers";
|
dbg() << "Reset timers";
|
||||||
m_system_timer->try_to_set_frequency(m_system_timer->calculate_nearest_possible_frequency(1024));
|
m_system_timer->try_to_set_frequency(m_system_timer->calculate_nearest_possible_frequency(1024));
|
||||||
m_time_keeper_timer->change_function(TimeManagement::update_time);
|
m_time_keeper_timer->set_callback(TimeManagement::update_time);
|
||||||
m_time_keeper_timer->try_to_set_frequency(OPTIMAL_TICKS_PER_SECOND_RATE);
|
m_time_keeper_timer->try_to_set_frequency(OPTIMAL_TICKS_PER_SECOND_RATE);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue