diff options
Diffstat (limited to 'include/linux/hrtimer.h')
| -rw-r--r-- | include/linux/hrtimer.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index d19a5c2d227..4d674c334fa 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h @@ -5,6 +5,7 @@ * * Copyright(C) 2005, Thomas Gleixner <tglx@linutronix.de> * Copyright(C) 2005, Red Hat, Inc., Ingo Molnar + * Copyright (C) 2014, NVIDIA CORPORATION. All rights reserved. * * data type definitions, declarations, prototypes * @@ -23,6 +24,7 @@ #include <linux/percpu.h> #include <linux/timer.h> #include <linux/timerqueue.h> +#include <asm/relaxed.h> struct hrtimer_clock_base; struct hrtimer_cpu_base; @@ -418,6 +420,11 @@ static inline int hrtimer_callback_running(struct hrtimer *timer) return timer->state & HRTIMER_STATE_CALLBACK; } +static inline int hrtimer_callback_running_relaxed(struct hrtimer *timer) +{ + return cpu_relaxed_read_long(&timer->state) & HRTIMER_STATE_CALLBACK; +} + /* Forward a hrtimer so it expires after now: */ extern u64 hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval); |
