irq_work.h 583 B

1234567891011121314151617181920212223242526272829
  1. #ifndef _LINUX_IRQ_WORK_H
  2. #define _LINUX_IRQ_WORK_H
  3. #include <linux/llist.h>
  4. struct irq_work {
  5. unsigned long flags;
  6. struct llist_node llnode;
  7. void (*func)(struct irq_work *);
  8. };
  9. static inline
  10. void init_irq_work(struct irq_work *work, void (*func)(struct irq_work *))
  11. {
  12. work->flags = 0;
  13. work->func = func;
  14. }
  15. bool irq_work_queue(struct irq_work *work);
  16. void irq_work_run(void);
  17. void irq_work_sync(struct irq_work *work);
  18. #ifdef CONFIG_IRQ_WORK
  19. bool irq_work_needs_cpu(void);
  20. #else
  21. static bool irq_work_needs_cpu(void) { return false; }
  22. #endif
  23. #endif /* _LINUX_IRQ_WORK_H */