ladybird/Kernel/PIC.h
Andreas Kling 27f699ef0c AK: Rename the common integer typedefs to make it obvious what they are.
These types can be picked up by including <AK/Types.h>:

* u8, u16, u32, u64 (unsigned)
* i8, i16, i32, i64 (signed)
2019-07-03 21:20:13 +02:00

26 lines
356 B
C++

#pragma once
#include <AK/Types.h>
namespace PIC {
void enable(u8 number);
void disable(u8 number);
void eoi(u8 number);
void initialize();
u16 get_isr();
u16 get_irr();
}
class IRQHandlerScope {
public:
explicit IRQHandlerScope(u8 irq)
: m_irq(irq)
{
}
~IRQHandlerScope() { PIC::eoi(m_irq); }
private:
u8 m_irq { 0 };
};