MOS Source Code
Loading...
Searching...
No Matches
interrupt.c File Reference
+ Include dependency graph for interrupt.c:

Go to the source code of this file.

Classes

struct  interrupt_handler_t
 

Functions

 SLAB_AUTOINIT ("irq_handler", irq_handler_slab, interrupt_handler_t)
 
void interrupt_entry (u32 irq)
 
void interrupt_handler_register (u32 irq, irq_serve_t handler, void *data)
 Register an interrupt handler.
 

Variables

static spinlock_t irq_handlers_lock = SPINLOCK_INIT
 
static list_head irq_handlers = LIST_HEAD_INIT(irq_handlers)
 
static slab_tirq_handler_slab = NULL
 

Function Documentation

◆ SLAB_AUTOINIT()

SLAB_AUTOINIT ( "irq_handler" ,
irq_handler_slab ,
interrupt_handler_t  )

◆ interrupt_entry()

void interrupt_entry ( u32 irq)

Definition at line 24 of file interrupt.c.

Referenced by riscv64_trap_handler(), and x86_handle_irq().

◆ interrupt_handler_register()

void interrupt_handler_register ( u32 irq,
irq_serve_t handler,
void * data )

Register an interrupt handler.

Parameters
irqThe interrupt number
handlerThe handler function
dataData to pass to the handler

Definition at line 38 of file interrupt.c.

Referenced by platform_startup_late().

+ Here is the call graph for this function:

Variable Documentation

◆ irq_handlers_lock

spinlock_t irq_handlers_lock = SPINLOCK_INIT
static

Definition at line 18 of file interrupt.c.

Referenced by interrupt_handler_register().

◆ irq_handlers

list_head irq_handlers = LIST_HEAD_INIT(irq_handlers)
static

Definition at line 19 of file interrupt.c.

Referenced by interrupt_entry(), and interrupt_handler_register().

◆ irq_handler_slab

slab_t* irq_handler_slab = NULL
static

Definition at line 21 of file interrupt.c.

Referenced by interrupt_handler_register().