Commit | Line | Data |
---|---|---|
e360adbe PZ |
1 | #ifndef _LINUX_IRQ_WORK_H |
2 | #define _LINUX_IRQ_WORK_H | |
3 | ||
38aaf809 HY |
4 | #include <linux/llist.h> |
5 | ||
e360adbe | 6 | struct irq_work { |
38aaf809 HY |
7 | unsigned long flags; |
8 | struct llist_node llnode; | |
e360adbe PZ |
9 | void (*func)(struct irq_work *); |
10 | }; | |
11 | ||
12 | static inline | |
38aaf809 | 13 | void init_irq_work(struct irq_work *work, void (*func)(struct irq_work *)) |
e360adbe | 14 | { |
38aaf809 HY |
15 | work->flags = 0; |
16 | work->func = func; | |
e360adbe PZ |
17 | } |
18 | ||
38aaf809 | 19 | bool irq_work_queue(struct irq_work *work); |
e360adbe | 20 | void irq_work_run(void); |
38aaf809 | 21 | void irq_work_sync(struct irq_work *work); |
e360adbe PZ |
22 | |
23 | #endif /* _LINUX_IRQ_WORK_H */ |