mirror of
https://github.com/SerenityOS/serenity
synced 2024-07-23 02:55:15 +00:00
Kernel: Rename GenericInterruptHandler "invoking count" to "call count"
This commit is contained in:
parent
8a5d2be617
commit
9b3db63e14
|
@ -37,7 +37,7 @@ extern "C" void handle_interrupt(TrapFrame const* const)
|
|||
|
||||
auto* handler = s_interrupt_handlers[irq];
|
||||
VERIFY(handler);
|
||||
handler->increment_invoking_counter();
|
||||
handler->increment_call_count();
|
||||
handler->handle_interrupt(regs);
|
||||
handler->eoi();
|
||||
|
||||
|
|
|
@ -509,7 +509,7 @@ void handle_interrupt(TrapFrame* trap)
|
|||
handler = s_interrupt_handler[irq];
|
||||
}
|
||||
VERIFY(handler);
|
||||
handler->increment_invoking_counter();
|
||||
handler->increment_call_count();
|
||||
handler->handle_interrupt(regs);
|
||||
handler->eoi();
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ ErrorOr<void> SysFSInterrupts::try_generate(KBufferBuilder& builder)
|
|||
TRY(obj.add("controller"sv, handler.controller()));
|
||||
TRY(obj.add("cpu_handler"sv, 0)); // FIXME: Determine the responsible CPU for each interrupt handler.
|
||||
TRY(obj.add("device_sharing"sv, (unsigned)handler.sharing_devices_count()));
|
||||
TRY(obj.add("call_count"sv, (unsigned)handler.get_invoking_count()));
|
||||
TRY(obj.add("call_count"sv, handler.call_count()));
|
||||
TRY(obj.finish());
|
||||
return {};
|
||||
})();
|
||||
|
|
|
@ -67,4 +67,9 @@ void GenericInterruptHandler::change_interrupt_number(u8 number)
|
|||
register_generic_interrupt_handler(InterruptManagement::acquire_mapped_interrupt_number(interrupt_number()), *this);
|
||||
}
|
||||
|
||||
void GenericInterruptHandler::increment_call_count()
|
||||
{
|
||||
++m_call_count;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ public:
|
|||
|
||||
u8 interrupt_number() const { return m_interrupt_number; }
|
||||
|
||||
size_t get_invoking_count() const { return m_invoking_count; }
|
||||
u32 call_count() const { return m_call_count; }
|
||||
|
||||
virtual size_t sharing_devices_count() const = 0;
|
||||
virtual bool is_shared_handler() const = 0;
|
||||
|
@ -48,10 +48,7 @@ public:
|
|||
virtual StringView controller() const = 0;
|
||||
|
||||
virtual bool eoi() = 0;
|
||||
ALWAYS_INLINE void increment_invoking_counter()
|
||||
{
|
||||
m_invoking_count++;
|
||||
}
|
||||
void increment_call_count();
|
||||
|
||||
protected:
|
||||
void change_interrupt_number(u8 number);
|
||||
|
@ -60,7 +57,7 @@ protected:
|
|||
void disable_remap() { m_disable_remap = true; }
|
||||
|
||||
private:
|
||||
Atomic<u32, AK::MemoryOrder::memory_order_relaxed> m_invoking_count { 0 };
|
||||
Atomic<u32, AK::MemoryOrder::memory_order_relaxed> m_call_count { 0 };
|
||||
u8 m_interrupt_number { 0 };
|
||||
bool m_disable_remap { false };
|
||||
bool m_registered { false };
|
||||
|
|
|
@ -74,7 +74,7 @@ bool SharedIRQHandler::handle_interrupt(RegisterState const& regs)
|
|||
for (auto& handler : m_handlers) {
|
||||
dbgln_if(INTERRUPT_DEBUG, "Going for Interrupt Handling @ {}, Shared Interrupt {}", i, interrupt_number());
|
||||
if (handler.handle_interrupt(regs)) {
|
||||
handler.increment_invoking_counter();
|
||||
handler.increment_call_count();
|
||||
was_handled = true;
|
||||
}
|
||||
dbgln_if(INTERRUPT_DEBUG, "Going for Interrupt Handling @ {}, Shared Interrupt {} - End", i, interrupt_number());
|
||||
|
|
|
@ -74,7 +74,7 @@ bool SpuriousInterruptHandler::handle_interrupt(RegisterState const& state)
|
|||
if (m_responsible_irq_controller->get_isr() & (1 << interrupt_number())) {
|
||||
m_real_irq = true; // remember that we had a real IRQ, when EOI later!
|
||||
if (m_real_handler->handle_interrupt(state)) {
|
||||
m_real_handler->increment_invoking_counter();
|
||||
m_real_handler->increment_call_count();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue