Changeset View
Changeset View
Standalone View
Standalone View
head/sys/sys/interrupt.h
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | struct intr_handler { | ||||
u_char ih_pri; /* Priority of this handler. */ | u_char ih_pri; /* Priority of this handler. */ | ||||
struct intr_thread *ih_thread; /* Ithread for filtered handler. */ | struct intr_thread *ih_thread; /* Ithread for filtered handler. */ | ||||
}; | }; | ||||
/* Interrupt handle flags kept in ih_flags */ | /* Interrupt handle flags kept in ih_flags */ | ||||
#define IH_EXCLUSIVE 0x00000002 /* Exclusive interrupt. */ | #define IH_EXCLUSIVE 0x00000002 /* Exclusive interrupt. */ | ||||
#define IH_ENTROPY 0x00000004 /* Device is a good entropy source. */ | #define IH_ENTROPY 0x00000004 /* Device is a good entropy source. */ | ||||
#define IH_DEAD 0x00000008 /* Handler should be removed. */ | #define IH_DEAD 0x00000008 /* Handler should be removed. */ | ||||
#define IH_SUSP 0x00000010 /* Device is powered down. */ | |||||
#define IH_CHANGED 0x40000000 /* Handler state is changed. */ | |||||
#define IH_MPSAFE 0x80000000 /* Handler does not need Giant. */ | #define IH_MPSAFE 0x80000000 /* Handler does not need Giant. */ | ||||
/* | /* | ||||
* Describe an interrupt event. An event holds a list of handlers. | * Describe an interrupt event. An event holds a list of handlers. | ||||
* The 'pre_ithread', 'post_ithread', 'post_filter', and 'assign_cpu' | * The 'pre_ithread', 'post_ithread', 'post_filter', and 'assign_cpu' | ||||
* hooks are used to invoke MD code for certain operations. | * hooks are used to invoke MD code for certain operations. | ||||
* | * | ||||
* The 'pre_ithread' hook is called when an interrupt thread for | * The 'pre_ithread' hook is called when an interrupt thread for | ||||
▲ Show 20 Lines • Show All 106 Lines • ▼ Show 20 Lines | int intr_event_create(struct intr_event **event, void *source, | ||||
void (*post_ithread)(void *), void (*post_filter)(void *), | void (*post_ithread)(void *), void (*post_filter)(void *), | ||||
int (*assign_cpu)(void *, int), const char *fmt, ...) | int (*assign_cpu)(void *, int), const char *fmt, ...) | ||||
__printflike(9, 10); | __printflike(9, 10); | ||||
int intr_event_describe_handler(struct intr_event *ie, void *cookie, | int intr_event_describe_handler(struct intr_event *ie, void *cookie, | ||||
const char *descr); | const char *descr); | ||||
int intr_event_destroy(struct intr_event *ie); | int intr_event_destroy(struct intr_event *ie); | ||||
int intr_event_handle(struct intr_event *ie, struct trapframe *frame); | int intr_event_handle(struct intr_event *ie, struct trapframe *frame); | ||||
int intr_event_remove_handler(void *cookie); | int intr_event_remove_handler(void *cookie); | ||||
int intr_event_suspend_handler(void *cookie); | |||||
int intr_event_resume_handler(void *cookie); | |||||
int intr_getaffinity(int irq, int mode, void *mask); | int intr_getaffinity(int irq, int mode, void *mask); | ||||
void *intr_handler_source(void *cookie); | void *intr_handler_source(void *cookie); | ||||
int intr_setaffinity(int irq, int mode, void *mask); | int intr_setaffinity(int irq, int mode, void *mask); | ||||
void _intr_drain(int irq); /* Linux compat only. */ | void _intr_drain(int irq); /* Linux compat only. */ | ||||
int swi_add(struct intr_event **eventp, const char *name, | int swi_add(struct intr_event **eventp, const char *name, | ||||
driver_intr_t handler, void *arg, int pri, enum intr_type flags, | driver_intr_t handler, void *arg, int pri, enum intr_type flags, | ||||
void **cookiep); | void **cookiep); | ||||
void swi_sched(void *cookie, int flags); | void swi_sched(void *cookie, int flags); | ||||
int swi_remove(void *cookie); | int swi_remove(void *cookie); | ||||
#endif | #endif |