mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05:00
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:
parent
a7d7c0e60c
commit
fe664965c2
7 changed files with 8 additions and 8 deletions
|
@ -438,7 +438,7 @@ void register_generic_interrupt_handler(u8 interrupt_number, GenericInterruptHan
|
|||
ASSERT(s_interrupt_handler[interrupt_number]->purpose() == HandlerPurpose::SharedIRQHandler);
|
||||
static_cast<SharedIRQHandler*>(s_interrupt_handler[interrupt_number])->register_handler(handler);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!s_interrupt_handler[interrupt_number]->is_shared_handler()) {
|
||||
ASSERT(s_interrupt_handler[interrupt_number]->purpose() == HandlerPurpose::IRQHandler);
|
||||
auto& previous_handler = *s_interrupt_handler[interrupt_number];
|
||||
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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; }
|
||||
|
||||
|
|
|
@ -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; }
|
||||
|
||||
|
|
|
@ -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; }
|
||||
|
||||
|
|
|
@ -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; }
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue