24 lines
454 B
C
24 lines
454 B
C
#ifndef _KERNEL_IRQ_IRQ_H
|
|
#define _KERNEL_IRQ_IRQ_H
|
|
|
|
#include <libk/std.h>
|
|
|
|
#define IRQ_INTERRUPT_SAFE (1 << 0)
|
|
|
|
typedef void (*irq_func_t) (void* arg, void* regs);
|
|
|
|
struct irq {
|
|
struct irq* next;
|
|
|
|
irq_func_t func;
|
|
void* arg;
|
|
uint32_t irq_num;
|
|
uint32_t flags;
|
|
};
|
|
|
|
bool irq_attach (irq_func_t, void* arg, uint32_t irq_num, uint32_t flags);
|
|
void irq_detach (irq_func_t func);
|
|
struct irq* irq_find (uint32_t irq_num);
|
|
|
|
#endif // _KERNEL_IRQ_IRQ_H
|