30 if (handler->irq == irq)
31 if (handler->handler(irq, handler->data))
41 new_handler->
irq = irq;
43 new_handler->
data = data;
#define LIST_HEAD_INIT(container)
MOSAPI void list_node_append(list_node_t *head, list_node_t *item)
#define list_foreach(t, v, h)
Iterate over a list.
list_node_t list_head
A linked list head.
void interrupt_entry(u32 irq)
static slab_t * irq_handler_slab
static spinlock_t irq_handlers_lock
static list_head irq_handlers
void interrupt_handler_register(u32 irq, irq_serve_t handler, void *data)
Register an interrupt handler.
bool(* irq_serve_t)(u32 irq, void *data)
Function pointer type for interrupt handlers.
#define SLAB_AUTOINIT(name, var, type)
#define spinlock_acquire(lock)
#define spinlock_release(lock)