aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/hrtimer.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/hrtimer.h')
-rw-r--r--include/linux/hrtimer.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 7a9398e19704..49067f14fac1 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -115,10 +115,8 @@ struct hrtimer {
115 enum hrtimer_restart (*function)(struct hrtimer *); 115 enum hrtimer_restart (*function)(struct hrtimer *);
116 struct hrtimer_clock_base *base; 116 struct hrtimer_clock_base *base;
117 unsigned long state; 117 unsigned long state;
118#ifdef CONFIG_HIGH_RES_TIMERS
119 enum hrtimer_cb_mode cb_mode; 118 enum hrtimer_cb_mode cb_mode;
120 struct list_head cb_entry; 119 struct list_head cb_entry;
121#endif
122#ifdef CONFIG_TIMER_STATS 120#ifdef CONFIG_TIMER_STATS
123 void *start_site; 121 void *start_site;
124 char start_comm[16]; 122 char start_comm[16];
@@ -194,10 +192,10 @@ struct hrtimer_cpu_base {
194 spinlock_t lock; 192 spinlock_t lock;
195 struct lock_class_key lock_key; 193 struct lock_class_key lock_key;
196 struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES]; 194 struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES];
195 struct list_head cb_pending;
197#ifdef CONFIG_HIGH_RES_TIMERS 196#ifdef CONFIG_HIGH_RES_TIMERS
198 ktime_t expires_next; 197 ktime_t expires_next;
199 int hres_active; 198 int hres_active;
200 struct list_head cb_pending;
201 unsigned long nr_events; 199 unsigned long nr_events;
202#endif 200#endif
203}; 201};
@@ -217,6 +215,11 @@ static inline ktime_t hrtimer_cb_get_time(struct hrtimer *timer)
217 return timer->base->get_time(); 215 return timer->base->get_time();
218} 216}
219 217
218static inline int hrtimer_is_hres_active(struct hrtimer *timer)
219{
220 return timer->base->cpu_base->hres_active;
221}
222
220/* 223/*
221 * The resolution of the clocks. The resolution value is returned in 224 * The resolution of the clocks. The resolution value is returned in
222 * the clock_getres() system call to give application programmers an 225 * the clock_getres() system call to give application programmers an
@@ -248,6 +251,10 @@ static inline ktime_t hrtimer_cb_get_time(struct hrtimer *timer)
248 return timer->base->softirq_time; 251 return timer->base->softirq_time;
249} 252}
250 253
254static inline int hrtimer_is_hres_active(struct hrtimer *timer)
255{
256 return 0;
257}
251#endif 258#endif
252 259
253extern ktime_t ktime_get(void); 260extern ktime_t ktime_get(void);
@@ -310,6 +317,7 @@ extern void hrtimer_init_sleeper(struct hrtimer_sleeper *sl,
310 317
311/* Soft interrupt function to run the hrtimer queues: */ 318/* Soft interrupt function to run the hrtimer queues: */
312extern void hrtimer_run_queues(void); 319extern void hrtimer_run_queues(void);
320extern void hrtimer_run_pending(void);
313 321
314/* Bootup initialization: */ 322/* Bootup initialization: */
315extern void __init hrtimers_init(void); 323extern void __init hrtimers_init(void);