The manual
ginnOS
The reference: libc, the libraries and the kernel
Loading...
Searching...
No Matches
isr.c File Reference
#include "isr.h"
#include "kernel/signal/signal.h"
#include "idt.h"
#include "common/stdint.h"
#include "common/stdio.h"
#include "kernel/assert.h"

Functions

void isr_init_gates (void)
 generated assembly function that installs all ISR gates.
void isr_initialize (void)
 initialize the interrupt system.
void __attribute__ ((cdecl))
 common C interrupt dispatcher.
void isr_register_handler (int vector, isr_handler_t handler)
 register a handler for an interrupt vector.

Function Documentation

◆ isr_init_gates()

void isr_init_gates ( void )
extern

generated assembly function that installs all ISR gates.

install all 256 ISR stub handlers into the IDT.

generated assembly function that installs all ISR gates.

called by isr_initialize() during kernel startup.

◆ isr_initialize()

void isr_initialize ( void )

initialize the interrupt system.

initialize the interrupt service routine subsystem.

installs all 256 ISR stubs into the IDT without marking any gate present. a gate becomes present only when a handler is registered via isr_register_handler(), making the present-bit meaningful rather than a blanket "everything is active" flag.

initialize the interrupt system.

installs all 256 ISR gates into the IDT and enables them.

◆ __attribute__()

void __attribute__ ( (cdecl) )

common C interrupt dispatcher.

called from the assembly ISR stubs.

◆ isr_register_handler()

void isr_register_handler ( int vector,
isr_handler_t handler )

register a handler for an interrupt vector.

register a handler function for a specific interrupt vector.

register a handler for an interrupt vector.

Parameters
vectorinterrupt vector number (0–255).
handlerpointer to the handler function to call when this interrupt fires.