Kernel: Change get_sharing_devices_count() in GenericInterruptHandler

The new method' name is sharing_devices_count().
The Serenity Coding Style tends to not accept the word "get" in
methods' names if possible.
This commit is contained in:
Liav A 2020-02-23 14:14:01 +02:00 committed by Andreas Kling
parent a7d7c0e60c
commit fe664965c2
7 changed files with 8 additions and 8 deletions

View file

@ -464,7 +464,7 @@ void unregister_generic_interrupt_handler(u8 interrupt_number, GenericInterruptH
if (s_interrupt_handler[interrupt_number]->is_shared_handler() && !s_interrupt_handler[interrupt_number]->is_sharing_with_others()) {
ASSERT(s_interrupt_handler[interrupt_number]->purpose() == HandlerPurpose::SharedIRQHandler);
static_cast<SharedIRQHandler*>(s_interrupt_handler[interrupt_number])->unregister_handler(handler);
if (!static_cast<SharedIRQHandler*>(s_interrupt_handler[interrupt_number])->get_sharing_devices_count()) {
if (!static_cast<SharedIRQHandler*>(s_interrupt_handler[interrupt_number])->sharing_devices_count()) {
revert_to_unused_handler(interrupt_number);
}
return;

View file

@ -351,7 +351,7 @@ Optional<KBuffer> procfs$interrupts(InodeIdentifier)
obj.add("purpose", "Interrupt Handler"); // FIXME: Determine the right description for each interrupt handler.
obj.add("interrupt_line", handler.interrupt_number());
obj.add("cpu_handler", 0); // FIXME: Determine the responsible CPU for each interrupt handler.
obj.add("device_sharing", (unsigned)handler.get_sharing_devices_count());
obj.add("device_sharing", (unsigned)handler.sharing_devices_count());
obj.add("call_count", (unsigned)handler.get_invoking_count());
});
array.finish();

View file

@ -51,7 +51,7 @@ public:
size_t get_invoking_count() const { return m_invoking_count; }
virtual size_t get_sharing_devices_count() const = 0;
virtual size_t sharing_devices_count() const = 0;
virtual bool is_shared_handler() const = 0;
virtual bool is_sharing_with_others() const = 0;

View file

@ -47,7 +47,7 @@ public:
virtual HandlerPurpose purpose() const override { return HandlerPurpose::IRQHandler; }
virtual size_t get_sharing_devices_count() const override { return 0; }
virtual size_t sharing_devices_count() const override { return 0; }
virtual bool is_shared_handler() const override { return false; }
virtual bool is_sharing_with_others() const override { return m_shared_with_others; }

View file

@ -44,7 +44,7 @@ public:
virtual bool eoi() override;
virtual size_t get_sharing_devices_count() const override { return 0; }
virtual size_t sharing_devices_count() const override { return 0; }
virtual bool is_shared_handler() const override { return false; }
virtual bool is_sharing_with_others() const override { return m_shared_with_others; }

View file

@ -45,7 +45,7 @@ public:
virtual bool eoi() override;
virtual size_t get_sharing_devices_count() const override { return m_handlers.size(); }
virtual size_t sharing_devices_count() const override { return m_handlers.size(); }
virtual bool is_shared_handler() const override { return true; }
virtual bool is_sharing_with_others() const override { return false; }

View file

@ -43,7 +43,7 @@ public:
virtual HandlerPurpose purpose() const override { return HandlerPurpose::UnhandledInterruptHandler; }
virtual size_t get_sharing_devices_count() const override { return 0; }
virtual size_t sharing_devices_count() const override { return 0; }
virtual bool is_shared_handler() const override { return false; }
virtual bool is_sharing_with_others() const override { return false; }