mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-29 22:24:08 +03:00
Kernel: Make HardwareTimer::model() return StringView
This commit is contained in:
parent
32a150f2b4
commit
f572d96539
Notes:
sideshowbarker
2024-07-18 07:26:05 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/f572d96539e
@ -16,7 +16,7 @@ class APICTimer final : public HardwareTimer<GenericInterruptHandler> {
|
||||
public:
|
||||
static APICTimer* initialize(u8, HardwareTimerBase&);
|
||||
virtual HardwareTimerType timer_type() const override { return HardwareTimerType::LocalAPICTimer; }
|
||||
virtual const char* model() const override { return "LocalAPIC"; }
|
||||
virtual StringView model() const override { return "LocalAPIC"sv; }
|
||||
virtual size_t ticks_per_second() const override;
|
||||
|
||||
virtual bool is_periodic() const override { return m_timer_mode == APIC::TimerMode::Periodic; }
|
||||
|
@ -19,7 +19,7 @@ public:
|
||||
static NonnullRefPtr<HPETComparator> create(u8 number, u8 irq, bool periodic_capable, bool is_64bit_capable);
|
||||
|
||||
virtual HardwareTimerType timer_type() const override { return HardwareTimerType::HighPrecisionEventTimer; }
|
||||
virtual const char* model() const override { return "HPET"; }
|
||||
virtual StringView model() const override { return "HPET"sv; }
|
||||
|
||||
u8 comparator_number() const { return m_comparator_number; }
|
||||
bool is_enabled() const { return m_enabled; }
|
||||
|
@ -35,7 +35,7 @@ public:
|
||||
// classes then should forward this to e.g. GenericInterruptHandler.
|
||||
virtual void will_be_destroyed() = 0;
|
||||
|
||||
virtual const char* model() const = 0;
|
||||
virtual StringView model() const = 0;
|
||||
virtual HardwareTimerType timer_type() const = 0;
|
||||
virtual Function<void(const RegisterState&)> set_callback(Function<void(const RegisterState&)>) = 0;
|
||||
|
||||
|
@ -36,7 +36,7 @@ class PIT final : public HardwareTimer<IRQHandler> {
|
||||
public:
|
||||
static NonnullRefPtr<PIT> initialize(Function<void(const RegisterState&)>);
|
||||
virtual HardwareTimerType timer_type() const override { return HardwareTimerType::i8253; }
|
||||
virtual const char* model() const override { return "i8254"; }
|
||||
virtual StringView model() const override { return "i8254"sv; }
|
||||
virtual size_t ticks_per_second() const override;
|
||||
|
||||
virtual bool is_periodic() const override { return m_periodic; }
|
||||
|
@ -15,7 +15,7 @@ class RealTimeClock final : public HardwareTimer<IRQHandler> {
|
||||
public:
|
||||
static NonnullRefPtr<RealTimeClock> create(Function<void(const RegisterState&)> callback);
|
||||
virtual HardwareTimerType timer_type() const override { return HardwareTimerType::RTC; }
|
||||
virtual const char* model() const override { return "Real Time Clock"; }
|
||||
virtual StringView model() const override { return "Real Time Clock"sv; }
|
||||
virtual size_t ticks_per_second() const override;
|
||||
|
||||
virtual bool is_periodic() const override { return true; }
|
||||
|
Loading…
Reference in New Issue
Block a user