mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 17:07:35 +00:00
Kernel/riscv64: Clean up Timer class
I just copy-pasted microseconds_since_boot and set_interrupt_interval_usec from aarch64. However, on RISC-V, they are not in microseconds. The TimerRegisters struct is also unused. current_time and set_compare can also be private and static.
This commit is contained in:
parent
8582f0720f
commit
d061da4cf5
2 changed files with 8 additions and 17 deletions
|
@ -13,8 +13,6 @@
|
|||
|
||||
namespace Kernel::RISCV64 {
|
||||
|
||||
struct TimerRegisters;
|
||||
|
||||
class Timer final : public HardwareTimer<GenericInterruptHandler> {
|
||||
public:
|
||||
static NonnullLockRefPtr<Timer> initialize();
|
||||
|
@ -37,14 +35,11 @@ public:
|
|||
// FIXME: Share code with HPET::update_time
|
||||
u64 update_time(u64& seconds_since_boot, u32& ticks_this_second, bool query_only);
|
||||
|
||||
u64 microseconds_since_boot();
|
||||
|
||||
void set_interrupt_interval_usec(u32);
|
||||
|
||||
private:
|
||||
Timer();
|
||||
|
||||
void set_compare(u64 compare);
|
||||
static u64 current_ticks();
|
||||
static void set_compare(u64 compare);
|
||||
|
||||
//^ GenericInterruptHandler
|
||||
virtual bool handle_interrupt(RegisterState const&) override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue