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.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index d19a5c2d2270..93def50764dd 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -176,6 +176,7 @@ enum hrtimer_base_type {
176 * @nr_hangs: Total number of hrtimer interrupt hangs 176 * @nr_hangs: Total number of hrtimer interrupt hangs
177 * @max_hang_time: Maximum time spent in hrtimer_interrupt 177 * @max_hang_time: Maximum time spent in hrtimer_interrupt
178 * @clock_base: array of clock bases for this cpu 178 * @clock_base: array of clock bases for this cpu
179 * @to_pull: LITMUS^RT list of timers to be pulled on this cpu
179 */ 180 */
180struct hrtimer_cpu_base { 181struct hrtimer_cpu_base {
181 raw_spinlock_t lock; 182 raw_spinlock_t lock;
@@ -191,8 +192,32 @@ struct hrtimer_cpu_base {
191 ktime_t max_hang_time; 192 ktime_t max_hang_time;
192#endif 193#endif
193 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 to_pull;
194}; 196};
195 197
198#ifdef CONFIG_ARCH_HAS_SEND_PULL_TIMERS
199
200#define HRTIMER_START_ON_INACTIVE 0
201#define HRTIMER_START_ON_QUEUED 1
202
203/*
204 * struct hrtimer_start_on_info - save timer info on remote cpu
205 * @list: list of hrtimer_start_on_info on remote cpu (to_pull)
206 * @timer: timer to be triggered on remote cpu
207 * @time: time event
208 * @mode: timer mode
209 * @state: activity flag
210 */
211struct hrtimer_start_on_info {
212 struct list_head list;
213 struct hrtimer *timer;
214 ktime_t time;
215 enum hrtimer_mode mode;
216 atomic_t state;
217};
218
219#endif
220
196static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time) 221static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time)
197{ 222{
198 timer->node.expires = time; 223 timer->node.expires = time;
@@ -366,6 +391,13 @@ __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,
366 unsigned long delta_ns, 391 unsigned long delta_ns,
367 const enum hrtimer_mode mode, int wakeup); 392 const enum hrtimer_mode mode, int wakeup);
368 393
394#ifdef CONFIG_ARCH_HAS_SEND_PULL_TIMERS
395extern void hrtimer_start_on_info_init(struct hrtimer_start_on_info *info);
396extern int hrtimer_start_on(int cpu, struct hrtimer_start_on_info *info,
397 struct hrtimer *timer, ktime_t time,
398 const enum hrtimer_mode mode);
399#endif
400
369extern int hrtimer_cancel(struct hrtimer *timer); 401extern int hrtimer_cancel(struct hrtimer *timer);
370extern int hrtimer_try_to_cancel(struct hrtimer *timer); 402extern int hrtimer_try_to_cancel(struct hrtimer *timer);
371 403