Kernel: Change data in /proc/interrupts to be more richer
Also, during interrupt handlers' enumeration, we call all interrupts handlers that are not UnhandledInterruptHandler.
This commit is contained in:
parent
773afefe7c
commit
7ef5d222f1
Notes:
sideshowbarker
2024-07-19 08:52:25 +09:00
Author: https://github.com/supercomputer7 Commit: https://github.com/SerenityOS/serenity/commit/7ef5d222f18 Pull-request: https://github.com/SerenityOS/serenity/pull/1353
2 changed files with 3 additions and 2 deletions
|
@ -363,8 +363,9 @@ Optional<KBuffer> procfs$interrupts(InodeIdentifier)
|
|||
JsonArraySerializer array { builder };
|
||||
InterruptManagement::the().enumerate_interrupt_handlers([&array](GenericInterruptHandler& handler) {
|
||||
auto obj = array.add_object();
|
||||
obj.add("purpose", "Interrupt Handler"); // FIXME: Determine the right description for each interrupt handler.
|
||||
obj.add("purpose", handler.purpose());
|
||||
obj.add("interrupt_line", handler.interrupt_number());
|
||||
obj.add("controller", handler.controller());
|
||||
obj.add("cpu_handler", 0); // FIXME: Determine the responsible CPU for each interrupt handler.
|
||||
obj.add("device_sharing", (unsigned)handler.sharing_devices_count());
|
||||
obj.add("call_count", (unsigned)handler.get_invoking_count());
|
||||
|
|
|
@ -63,7 +63,7 @@ void InterruptManagement::enumerate_interrupt_handlers(Function<void(GenericInte
|
|||
{
|
||||
for (int i = 0; i < GENERIC_INTERRUPT_HANDLERS_COUNT; i++) {
|
||||
auto& handler = get_interrupt_handler(i);
|
||||
if (handler.get_invoking_count() > 0)
|
||||
if (handler.type() != HandlerType::UnhandledInterruptHandler)
|
||||
callback(handler);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue