10#ifndef KERNEL_ARCH_X86_64_IRQ_H
11#define KERNEL_ARCH_X86_64_IRQ_H
36 asm volatile (
"pushfq\n\tpopq %0\n\tcli" :
"=r"(flags) : :
"memory");
45 if (flags & (1 << 9))
asm volatile (
"sti" : : :
"memory");
Initializes and holds the IDT for the kernel.
static uint64_t irq_save(void)
Saves the IRQ and disables interrupts (used when using a variable that is modified by an interrupt).
void irq_handler(struct interrupt_frame *frame)
Calls the correct handler and returns the interrupt.
void irq_register(uint8_t irq, irq_handler_fn fn)
Registers a handler function for the specified IRQ number.
static void irq_restore(uint64_t flags)
Restores the IRQ and re-enables interrupts (used when using a variable that is modified by an interru...
The frame holding the registers when an interrupt happens.