Commit | Line | Data |
---|---|---|
511cbce2 CH |
1 | #ifndef IRQ_POLL_H |
2 | #define IRQ_POLL_H | |
3 | ||
4 | struct irq_poll; | |
5 | typedef int (irq_poll_fn)(struct irq_poll *, int); | |
6 | ||
7 | struct irq_poll { | |
8 | struct list_head list; | |
9 | unsigned long state; | |
10 | unsigned long data; | |
11 | int weight; | |
12 | int max; | |
13 | irq_poll_fn *poll; | |
14 | }; | |
15 | ||
16 | enum { | |
17 | IRQ_POLL_F_SCHED = 0, | |
18 | IRQ_POLL_F_DISABLE = 1, | |
19 | }; | |
20 | ||
511cbce2 CH |
21 | static inline int irq_poll_disable_pending(struct irq_poll *iop) |
22 | { | |
23 | return test_bit(IRQ_POLL_F_DISABLE, &iop->state); | |
24 | } | |
25 | ||
26 | extern void irq_poll_sched(struct irq_poll *); | |
27 | extern void irq_poll_init(struct irq_poll *, int, irq_poll_fn *); | |
28 | extern void irq_poll_complete(struct irq_poll *); | |
29 | extern void __irq_poll_complete(struct irq_poll *); | |
30 | extern void irq_poll_enable(struct irq_poll *); | |
31 | extern void irq_poll_disable(struct irq_poll *); | |
32 | ||
33 | #endif |