diff options
author | Jeremy Erickson <jerickso@cs.unc.edu> | 2012-08-30 21:01:47 -0400 |
---|---|---|
committer | Jeremy Erickson <jerickso@cs.unc.edu> | 2012-08-30 21:01:47 -0400 |
commit | b1e1fea67bca3796d5f9133a92c300ec4fa93a4f (patch) | |
tree | 5cc1336e1fe1d6f93b1067e73e43381dd20db690 /include/linux/hrtimer.h | |
parent | f6f94e2ab1b33f0082ac22d71f66385a60d8157f (diff) |
Bjoern's Dissertation Code with Priority Donationwip-splitting-omlp-jerickso
Diffstat (limited to 'include/linux/hrtimer.h')
-rw-r--r-- | include/linux/hrtimer.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index fd0c1b857d3d..76da541c1f66 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h | |||
@@ -167,6 +167,7 @@ struct hrtimer_clock_base { | |||
167 | * @nr_retries: Total number of hrtimer interrupt retries | 167 | * @nr_retries: Total number of hrtimer interrupt retries |
168 | * @nr_hangs: Total number of hrtimer interrupt hangs | 168 | * @nr_hangs: Total number of hrtimer interrupt hangs |
169 | * @max_hang_time: Maximum time spent in hrtimer_interrupt | 169 | * @max_hang_time: Maximum time spent in hrtimer_interrupt |
170 | * @to_pull: LITMUS^RT list of timers to be pulled on this cpu | ||
170 | */ | 171 | */ |
171 | struct hrtimer_cpu_base { | 172 | struct hrtimer_cpu_base { |
172 | raw_spinlock_t lock; | 173 | raw_spinlock_t lock; |
@@ -180,8 +181,32 @@ struct hrtimer_cpu_base { | |||
180 | unsigned long nr_hangs; | 181 | unsigned long nr_hangs; |
181 | ktime_t max_hang_time; | 182 | ktime_t max_hang_time; |
182 | #endif | 183 | #endif |
184 | struct list_head to_pull; | ||
183 | }; | 185 | }; |
184 | 186 | ||
187 | #ifdef CONFIG_ARCH_HAS_SEND_PULL_TIMERS | ||
188 | |||
189 | #define HRTIMER_START_ON_INACTIVE 0 | ||
190 | #define HRTIMER_START_ON_QUEUED 1 | ||
191 | |||
192 | /* | ||
193 | * struct hrtimer_start_on_info - save timer info on remote cpu | ||
194 | * @list: list of hrtimer_start_on_info on remote cpu (to_pull) | ||
195 | * @timer: timer to be triggered on remote cpu | ||
196 | * @time: time event | ||
197 | * @mode: timer mode | ||
198 | * @state: activity flag | ||
199 | */ | ||
200 | struct hrtimer_start_on_info { | ||
201 | struct list_head list; | ||
202 | struct hrtimer *timer; | ||
203 | ktime_t time; | ||
204 | enum hrtimer_mode mode; | ||
205 | atomic_t state; | ||
206 | }; | ||
207 | |||
208 | #endif | ||
209 | |||
185 | static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time) | 210 | static inline void hrtimer_set_expires(struct hrtimer *timer, ktime_t time) |
186 | { | 211 | { |
187 | timer->_expires = time; | 212 | timer->_expires = time; |
@@ -348,6 +373,13 @@ __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim, | |||
348 | unsigned long delta_ns, | 373 | unsigned long delta_ns, |
349 | const enum hrtimer_mode mode, int wakeup); | 374 | const enum hrtimer_mode mode, int wakeup); |
350 | 375 | ||
376 | #ifdef CONFIG_ARCH_HAS_SEND_PULL_TIMERS | ||
377 | extern void hrtimer_start_on_info_init(struct hrtimer_start_on_info *info); | ||
378 | extern int hrtimer_start_on(int cpu, struct hrtimer_start_on_info *info, | ||
379 | struct hrtimer *timer, ktime_t time, | ||
380 | const enum hrtimer_mode mode); | ||
381 | #endif | ||
382 | |||
351 | extern int hrtimer_cancel(struct hrtimer *timer); | 383 | extern int hrtimer_cancel(struct hrtimer *timer); |
352 | extern int hrtimer_try_to_cancel(struct hrtimer *timer); | 384 | extern int hrtimer_try_to_cancel(struct hrtimer *timer); |
353 | 385 | ||