...
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "kernel.h"
|
||||
#include <stdint.h>
|
||||
|
||||
typedef struct
|
||||
@@ -13,16 +14,22 @@ typedef struct
|
||||
|
||||
typedef void (*irq_handler_t)(const isr_frame_t*);
|
||||
|
||||
void pic_remap();
|
||||
void remap_pic();
|
||||
void disable_pic();
|
||||
|
||||
bool cpu_has_apic();
|
||||
void enable_apic();
|
||||
|
||||
void register_irq_handler(uint8_t irq, irq_handler_t handler);
|
||||
|
||||
static inline void enable_interrupts()
|
||||
{
|
||||
__asm__ volatile("sti");
|
||||
kprintf("Interrupts enabled\n");
|
||||
}
|
||||
|
||||
static inline void disable_interrupts()
|
||||
{
|
||||
__asm__ volatile("cli");
|
||||
kprintf("Interrupts disabled\n");
|
||||
}
|
||||
Reference in New Issue
Block a user