Return to kern_irq.h CVS log | Up to [local] / funnyos / sys |
File: [local] / funnyos / sys / kern_irq.h (download)
Revision 1.1, Fri Nov 2 11:40:02 2007 UTC (16 years, 7 months ago) by init
first steps towards interrupts support; intr_establish() and intr_disestablish() can be used by devconfig to register (and unregister) interrupts handlers during device attachment. intr_execute() is used to quick execute (registered) handler by passed intrno. still more work to do. |
/* * $Id: kern_irq.h,v 1.1 2007/11/02 11:40:02 init Exp $ */ #ifndef _SYS_KERN_IRQ_H #define _SYS_KERN_IRQ_H #include <sys/types.h> #include <sys/device.h> struct intr_vector { uint8_t iv_intrno; /* interrupt number in attachinfo */ struct device *iv_device; /* associated device */ void (*iv_intrfunc)(struct device *); /* interrupt handler in device driver */ struct intr_vector *iv_next; /* next vector in linked list */ }; void intr_establish(uint8_t intrno, struct device *device, void (*intrfunc)(struct device *)); void intr_disestablish(uint8_t intrno); void intr_execute(uint8_t intrno); #endif /* not _SYS_KERN_IRQ_H */