MyOS Kernel
isr.h File Reference
#include <stdint.h>
#include <sys/types.h>

Go to the source code of this file.

Data Structures

struct  registers_t
 

Typedefs

typedef void(* isr_t) (registers_t *)
 Type of an ISR handler function pointer.
 

Functions

void isr_install ()
 
void isr_register_handler (int n, pid_t pid, void *handler)
 

Function Documentation

◆ isr_install()

void isr_install ( )

Install the interrupt handlers into the IDT.

◆ isr_register_handler()

void isr_register_handler ( int  n,
pid_t  pid,
void *  handler 
)

Register an IRQ handler

If the PID is 0, the handler will be called directly, otherwise a thread will be made in the PID starting at the handler's address.

Parameters
nThe IRQ to register a handler for
pidThe PID that will handle the interrupt.
handlerThe address of the handler.