aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/hrtimer.c
diff options
context:
space:
mode:
authorRoman Zippel <zippel@linux-m68k.org>2006-03-26 04:38:06 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-26 11:57:02 -0500
commit44f21475511bbc0135b52c66ad74dcc6a9026da3 (patch)
tree5cbd605c9d074f40b52a877859957432311b2399 /kernel/hrtimer.c
parent92127c7a45d4d167d9b015a5f9de6b41ed66f1d0 (diff)
[PATCH] hrtimers: pass current time to hrtimer_forward()
Pass current time to hrtimer_forward(). This allows to use the softirq time in the timer base when the forward function is called from the timer callback. Other places pass current time with a call to timer->base->get_time(). Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/hrtimer.c')
-rw-r--r--kernel/hrtimer.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c
index b728cc53452b..e989c9981a96 100644
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -301,18 +301,17 @@ void unlock_hrtimer_base(const struct hrtimer *timer, unsigned long *flags)
301 * hrtimer_forward - forward the timer expiry 301 * hrtimer_forward - forward the timer expiry
302 * 302 *
303 * @timer: hrtimer to forward 303 * @timer: hrtimer to forward
304 * @now: forward past this time
304 * @interval: the interval to forward 305 * @interval: the interval to forward
305 * 306 *
306 * Forward the timer expiry so it will expire in the future. 307 * Forward the timer expiry so it will expire in the future.
307 * Returns the number of overruns. 308 * Returns the number of overruns.
308 */ 309 */
309unsigned long 310unsigned long
310hrtimer_forward(struct hrtimer *timer, ktime_t interval) 311hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval)
311{ 312{
312 unsigned long orun = 1; 313 unsigned long orun = 1;
313 ktime_t delta, now; 314 ktime_t delta;
314
315 now = timer->base->get_time();
316 315
317 delta = ktime_sub(now, timer->expires); 316 delta = ktime_sub(now, timer->expires);
318 317