diff options
Diffstat (limited to 'include/linux/interrupt.h')
-rw-r--r-- | include/linux/interrupt.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 2721f07e9354..fd4c9c63c757 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> |
@@ -517,6 +518,31 @@ extern void tasklet_kill_immediate(struct tasklet_struct *t, unsigned int cpu); | |||
517 | extern void tasklet_init(struct tasklet_struct *t, | 518 | extern void tasklet_init(struct tasklet_struct *t, |
518 | void (*func)(unsigned long), unsigned long data); | 519 | void (*func)(unsigned long), unsigned long data); |
519 | 520 | ||
521 | struct tasklet_hrtimer { | ||
522 | struct hrtimer timer; | ||
523 | struct tasklet_struct tasklet; | ||
524 | enum hrtimer_restart (*function)(struct hrtimer *); | ||
525 | }; | ||
526 | |||
527 | extern void | ||
528 | tasklet_hrtimer_init(struct tasklet_hrtimer *ttimer, | ||
529 | enum hrtimer_restart (*function)(struct hrtimer *), | ||
530 | clockid_t which_clock, enum hrtimer_mode mode); | ||
531 | |||
532 | static inline | ||
533 | int tasklet_hrtimer_start(struct tasklet_hrtimer *ttimer, ktime_t time, | ||
534 | const enum hrtimer_mode mode) | ||
535 | { | ||
536 | return hrtimer_start(&ttimer->timer, time, mode); | ||
537 | } | ||
538 | |||
539 | static inline | ||
540 | void tasklet_hrtimer_cancel(struct tasklet_hrtimer *ttimer) | ||
541 | { | ||
542 | hrtimer_cancel(&ttimer->timer); | ||
543 | tasklet_kill(&ttimer->tasklet); | ||
544 | } | ||
545 | |||
520 | /* | 546 | /* |
521 | * Autoprobing for irqs: | 547 | * Autoprobing for irqs: |
522 | * | 548 | * |