MyOS Kernel
isr.c File Reference
#include "../../kernel.h"
#include "../../tasking.h"
#include "../../vga_err.h"
#include "../../address_spaces.h"
#include "../halt.h"
#include "../isr.h"
#include "../paging.h"
#include "../serial.h"
#include "gdt.h"
#include "idt.h"
#include "isr.h"
#include "interrupt.h"
#include <cpu/ports.h>
#include <stdint.h>
#include <string.h>
#include <sys/syscalls.h>
#include <sys/types.h>

Functions

void irq_handler (registers_t *r)
 
void isr_install ()
 
void isr_handler (registers_t *r)
 
void isr_register_handler (int n, isr_t handler)
 

Variables

static isr_t irq_handlers [16]
 Handlers for the PIC interrupts.
 
static char * exception_messages []
 List of messages for each exception.
 

Function Documentation

◆ irq_handler()

void irq_handler ( registers_t r)

Handler for PIC interrupts

Parameters
rThe saved state of the CPU

◆ isr_handler()

void isr_handler ( registers_t r)

Handler for non-PIC interrupts

Parameters
rThe saved state of the CPU

◆ isr_install()

void isr_install ( )

Install the interrupt handlers into the IDT.

◆ isr_register_handler()

void isr_register_handler ( int  n,
isr_t  handler 
)

Register an IRQ handler

Parameters
nthe IRQ to register a handler for
handlerthe handler to register