aboutsummaryrefslogtreecommitdiff
path: root/src/idt/interrupthandler.cc
blob: 7524f19a71048cb7d1e633a7cc219d5421a96607 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include <stdlib.h>
#include "../idt.h"

InterruptHandler::InterruptHandler(uint8_t irq) : m_irq(irq) {
  IDT::install(m_irq, this);
}

InterruptHandler::~InterruptHandler() {
  IDT::uninstall(m_irq, this);
}

cpu_state_t* InterruptHandler::trigger(cpu_state_t* cpu) {
  printk("Unhandled interrupt ", uhex{m_irq}, '\n');
  return cpu;
}