diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-07-22 13:12:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-07-22 13:12:18 -0400 |
commit | 612e900c286a9535cc17da5171b0d8dcf8f3a12f (patch) | |
tree | f6931d0c1bc6cf8f798e04437a1a9c3d59a4eea5 /include/linux/interrupt.h | |
parent | c57c3743784e08d8ceaaea928a8c84ad8b403aed (diff) | |
parent | 9ba5f005c994ad28e266a0cd14ef29354be382c9 (diff) |
Merge branch 'core-fixes-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-fixes-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
softirq: introduce tasklet_hrtimer infrastructure
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 88b056ac5629..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> |
@@ -519,6 +520,31 @@ extern void tasklet_kill_immediate(struct tasklet_struct *t, unsigned int cpu); | |||
519 | extern void tasklet_init(struct tasklet_struct *t, | 520 | extern void tasklet_init(struct tasklet_struct *t, |
520 | void (*func)(unsigned long), unsigned long data); | 521 | void (*func)(unsigned long), unsigned long data); |
521 | 522 | ||
523 | struct tasklet_hrtimer { | ||
524 | struct hrtimer timer; | ||
525 | struct tasklet_struct tasklet; | ||
526 | enum hrtimer_restart (*function)(struct hrtimer *); | ||
527 | }; | ||
528 | |||
529 | extern void | ||
530 | tasklet_hrtimer_init(struct tasklet_hrtimer *ttimer, | ||
531 | enum hrtimer_restart (*function)(struct hrtimer *), | ||
532 | clockid_t which_clock, enum hrtimer_mode mode); | ||
533 | |||
534 | static inline | ||
535 | int 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 | |||
541 | static inline | ||
542 | void tasklet_hrtimer_cancel(struct tasklet_hrtimer *ttimer) | ||
543 | { | ||
544 | hrtimer_cancel(&ttimer->timer); | ||
545 | tasklet_kill(&ttimer->tasklet); | ||
546 | } | ||
547 | |||
522 | /* | 548 | /* |
523 | * Autoprobing for irqs: | 549 | * Autoprobing for irqs: |
524 | * | 550 | * |