irq_work.h 460 字节
Newer Older
1 2 3
#ifndef _LINUX_IRQ_WORK_H
#define _LINUX_IRQ_WORK_H

4 5
#include <linux/llist.h>

6
struct irq_work {
7 8
	unsigned long flags;
	struct llist_node llnode;
9 10 11 12
	void (*func)(struct irq_work *);
};

static inline
13
void init_irq_work(struct irq_work *work, void (*func)(struct irq_work *))
14
{
15 16
	work->flags = 0;
	work->func = func;
17 18
}

19
bool irq_work_queue(struct irq_work *work);
20
void irq_work_run(void);
21
void irq_work_sync(struct irq_work *work);
22 23

#endif /* _LINUX_IRQ_WORK_H */