ladybird/Kernel/PIC.h
Andreas Kling 9d05f6b7a7 Make bash-2.05b build with minimal changes.
This is really neat. :^)
2018-11-17 00:14:07 +01:00

24 lines
351 B
C++

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