mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 22:38:13 +00:00
Kernel/Interrupts: Return boolean on whether we handled the interrupt
If we are in a shared interrupt handler, the called handlers might indicate it was not their interrupt, so we should not increment the call counter of these handlers.
This commit is contained in:
parent
7a6d5a7b8b
commit
b91df26d4a
43 changed files with 125 additions and 71 deletions
|
@ -85,11 +85,11 @@ void PS2KeyboardDevice::irq_handle_byte_read(u8 byte)
|
|||
}
|
||||
}
|
||||
|
||||
void PS2KeyboardDevice::handle_irq(const RegisterState&)
|
||||
bool PS2KeyboardDevice::handle_irq(const RegisterState&)
|
||||
{
|
||||
// The controller will read the data and call irq_handle_byte_read
|
||||
// for the appropriate device
|
||||
m_i8042_controller->irq_process_input_buffer(HIDDevice::Type::Keyboard);
|
||||
return m_i8042_controller->irq_process_input_buffer(HIDDevice::Type::Keyboard);
|
||||
}
|
||||
|
||||
UNMAP_AFTER_INIT RefPtr<PS2KeyboardDevice> PS2KeyboardDevice::try_to_initialize(const I8042Controller& ps2_controller)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue