aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2009-12-17 21:45:38 -0500
committerAndrea Bastoni <bastoni@cs.unc.edu>2009-12-17 21:45:38 -0500
commit58054c96a3e5cb03a1ffa13a42caf877f0152a37 (patch)
treedc1c6287725d0cd5e7c95e84eaa082f0a92c1c1d /include
parentaa4cc937bbdb828cc031e811cbf6fae79a59ee4a (diff)
Add hrtimer_start_on() API
Diffstat (limited to 'include')
-rw-r--r--include/linux/hrtimer.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index ff037f0b1b4e..b984b947f5db 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -166,6 +166,7 @@ struct hrtimer_clock_base {
166 * event devices whether high resolution mode can be 166 * event devices whether high resolution mode can be
167 * activated. 167 * activated.
168 * @nr_events: Total number of timer interrupt events 168 * @nr_events: Total number of timer interrupt events
169 * @to_pull: LITMUS^RT list of timers to be pulled on this cpu
169 */ 170 */
170struct hrtimer_cpu_base { 171struct hrtimer_cpu_base {
171 spinlock_t lock; 172 spinlock_t lock;
@@ -175,6 +176,26 @@ struct hrtimer_cpu_base {
175 int hres_active; 176 int hres_active;
176 unsigned long nr_events; 177 unsigned long nr_events;
177#endif 178#endif
179 struct list_head to_pull;
180};
181
182#define HRTIMER_START_ON_INACTIVE 0
183#define HRTIMER_START_ON_QUEUED 1
184
185/*
186 * struct hrtimer_start_on_info - save timer info on remote cpu
187 * @list: list of hrtimer_start_on_info on remote cpu (to_pull)
188 * @timer: timer to be triggered on remote cpu
189 * @time: time event
190 * @mode: timer mode
191 * @state: activity flag
192 */
193struct hrtimer_start_on_info {
194 struct list_head list;
195 struct hrtimer *timer;
196 ktime_t time;
197 enum hrtimer_mode mode;
198 atomic_t state;
178}; 199};
179 200
180static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time) 201static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time)
@@ -343,6 +364,10 @@ __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,
343 unsigned long delta_ns, 364 unsigned long delta_ns,
344 const enum hrtimer_mode mode, int wakeup); 365 const enum hrtimer_mode mode, int wakeup);
345 366
367extern int hrtimer_start_on(int cpu, struct hrtimer_start_on_info *info,
368 struct hrtimer *timer, ktime_t time,
369 const enum hrtimer_mode mode);
370
346extern int hrtimer_cancel(struct hrtimer *timer); 371extern int hrtimer_cancel(struct hrtimer *timer);
347extern int hrtimer_try_to_cancel(struct hrtimer *timer); 372extern int hrtimer_try_to_cancel(struct hrtimer *timer);
348 373