All checks were successful
Build documentation / build-and-deploy (push) Successful in 1m35s
23 lines
481 B
C
23 lines
481 B
C
#ifndef _KERNEL_IRQ_IRQ_H
|
|
#define _KERNEL_IRQ_IRQ_H
|
|
|
|
#include <libk/rbtree.h>
|
|
#include <libk/std.h>
|
|
#include <sys/smp.h>
|
|
|
|
typedef bool (*irq_func_t) (struct cpu** reschedule_cpu, void* arg, void* regs);
|
|
|
|
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
|