All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m12s
24 lines
512 B
C
24 lines
512 B
C
#ifndef _KERNEL_IRQ_IRQ_H
|
|
#define _KERNEL_IRQ_IRQ_H
|
|
|
|
#include <libk/list.h>
|
|
#include <libk/rbtree.h>
|
|
#include <libk/std.h>
|
|
#include <proc/reschedule.h>
|
|
|
|
typedef void (*irq_func_t) (void* arg, void* regs, struct reschedule_ctx* rctx);
|
|
|
|
struct irq {
|
|
uint32_t irq_num;
|
|
struct rb_node_link irq_tree_link;
|
|
|
|
irq_func_t func;
|
|
void* arg;
|
|
};
|
|
|
|
bool irq_attach (irq_func_t func, void* arg, uint32_t irq_num);
|
|
void irq_detach (uint32_t irq_num);
|
|
struct irq* irq_find (uint32_t irq_num);
|
|
|
|
#endif // _KERNEL_IRQ_IRQ_H
|