ArvernOS
Loading...
Searching...
No Matches
isr.h File Reference
#include <stdint.h>
Include dependency graph for isr.h:

Typedefs

typedef void(* isr_handler_t) (isr_stack_t *stack)
 This type represents an interrupt handler.
 

Functions

void isr_init ()
 
void isr_enable_interrupts ()
 
void isr_disable_interrupts ()
 
void isr_register_handler (uint32_t id, isr_handler_t handler)
 
isr_handler_t isr_get_handler (uint32_t id)
 

Function Documentation

◆ isr_disable_interrupts()

void isr_disable_interrupts ( )

Disables interrupts.

◆ isr_enable_interrupts()

void isr_enable_interrupts ( )

Enables interrupts.

◆ isr_get_handler()

isr_handler_t isr_get_handler ( uint32_t id)

Returns the handler corresponding to the interrupt id passed as first argument.

Parameters
idan interrupt id
Returns
the handler attached to the interrupt or 0

◆ isr_init()

void isr_init ( )

Initializes the Interrupt Service Routines (ISR).

◆ isr_register_handler()

void isr_register_handler ( uint32_t id,
isr_handler_t handler )

Registers a handler for a given interrupt. It does not matter whether the interrupt is an exception, a hardware or software interrupt.

Parameters
idan interrupt id
handlerthe handler to attach to the interrupt