mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:27:35 +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
|
@ -205,8 +205,10 @@ void SB16::dma_start(uint32_t length)
|
|||
IO::out8(0xd4, (channel % 4));
|
||||
}
|
||||
|
||||
void SB16::handle_irq(const RegisterState&)
|
||||
bool SB16::handle_irq(const RegisterState&)
|
||||
{
|
||||
// FIXME: Check if the interrupt was actually for us or not... (shared IRQs)
|
||||
|
||||
// Stop sound output ready for the next block.
|
||||
dsp_write(0xd5);
|
||||
|
||||
|
@ -215,6 +217,7 @@ void SB16::handle_irq(const RegisterState&)
|
|||
IO::in8(DSP_R_ACK); // 16 bit interrupt
|
||||
|
||||
m_irq_queue.wake_all();
|
||||
return true;
|
||||
}
|
||||
|
||||
void SB16::wait_for_irq()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue