aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/interrupt.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/interrupt.h')
-rw-r--r--include/linux/interrupt.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index 2721f07e9354..35e7df1e9f30 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -14,6 +14,7 @@
14#include <linux/irqflags.h> 14#include <linux/irqflags.h>
15#include <linux/smp.h> 15#include <linux/smp.h>
16#include <linux/percpu.h> 16#include <linux/percpu.h>
17#include <linux/hrtimer.h>
17 18
18#include <asm/atomic.h> 19#include <asm/atomic.h>
19#include <asm/ptrace.h> 20#include <asm/ptrace.h>
@@ -64,11 +65,13 @@
64 * IRQTF_RUNTHREAD - signals that the interrupt handler thread should run 65 * IRQTF_RUNTHREAD - signals that the interrupt handler thread should run
65 * IRQTF_DIED - handler thread died 66 * IRQTF_DIED - handler thread died
66 * IRQTF_WARNED - warning "IRQ_WAKE_THREAD w/o thread_fn" has been printed 67 * IRQTF_WARNED - warning "IRQ_WAKE_THREAD w/o thread_fn" has been printed
68 * IRQTF_AFFINITY - irq thread is requested to adjust affinity
67 */ 69 */
68enum { 70enum {
69 IRQTF_RUNTHREAD, 71 IRQTF_RUNTHREAD,
70 IRQTF_DIED, 72 IRQTF_DIED,
71 IRQTF_WARNED, 73 IRQTF_WARNED,
74 IRQTF_AFFINITY,
72}; 75};
73 76
74typedef irqreturn_t (*irq_handler_t)(int, void *); 77typedef irqreturn_t (*irq_handler_t)(int, void *);
@@ -517,6 +520,31 @@ extern void tasklet_kill_immediate(struct tasklet_struct *t, unsigned int cpu);
517extern void tasklet_init(struct tasklet_struct *t, 520extern void tasklet_init(struct tasklet_struct *t,
518 void (*func)(unsigned long), unsigned long data); 521 void (*func)(unsigned long), unsigned long data);
519 522
523struct tasklet_hrtimer {
524 struct hrtimer timer;
525 struct tasklet_struct tasklet;
526 enum hrtimer_restart (*function)(struct hrtimer *);
527};
528
529extern void
530tasklet_hrtimer_init(struct tasklet_hrtimer *ttimer,
531 enum hrtimer_restart (*function)(struct hrtimer *),
532 clockid_t which_clock, enum hrtimer_mode mode);
533
534static inline
535int tasklet_hrtimer_start(struct tasklet_hrtimer *ttimer, ktime_t time,
536 const enum hrtimer_mode mode)
537{
538 return hrtimer_start(&ttimer->timer, time, mode);
539}
540
541static inline
542void tasklet_hrtimer_cancel(struct tasklet_hrtimer *ttimer)
543{
544 hrtimer_cancel(&ttimer->timer);
545 tasklet_kill(&ttimer->tasklet);
546}
547
520/* 548/*
521 * Autoprobing for irqs: 549 * Autoprobing for irqs:
522 * 550 *