blob: ce60c084635b5a9cef539ed79c8b34fe0b583a15 [file] [log] [blame]
Peter Zijlstrae360adb2010-10-14 14:01:34 +08001#ifndef _LINUX_IRQ_WORK_H
2#define _LINUX_IRQ_WORK_H
3
Huang Ying38aaf802011-09-08 14:00:46 +08004#include <linux/llist.h>
5
Peter Zijlstrae360adb2010-10-14 14:01:34 +08006struct irq_work {
Huang Ying38aaf802011-09-08 14:00:46 +08007 unsigned long flags;
8 struct llist_node llnode;
Peter Zijlstrae360adb2010-10-14 14:01:34 +08009 void (*func)(struct irq_work *);
10};
11
12static inline
Huang Ying38aaf802011-09-08 14:00:46 +080013void init_irq_work(struct irq_work *work, void (*func)(struct irq_work *))
Peter Zijlstrae360adb2010-10-14 14:01:34 +080014{
Huang Ying38aaf802011-09-08 14:00:46 +080015 work->flags = 0;
16 work->func = func;
Peter Zijlstrae360adb2010-10-14 14:01:34 +080017}
18
anish kumarc02cf5f2013-02-03 22:08:23 +010019void irq_work_queue(struct irq_work *work);
Peter Zijlstrae360adb2010-10-14 14:01:34 +080020void irq_work_run(void);
Huang Ying38aaf802011-09-08 14:00:46 +080021void irq_work_sync(struct irq_work *work);
Peter Zijlstrae360adb2010-10-14 14:01:34 +080022
23#endif /* _LINUX_IRQ_WORK_H */