Re: [patch 6/13] signal/timer/event fds v9 - timerfd core ...

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Davide Libenzi <davidel@...>
Cc: Linux Kernel Mailing List <linux-kernel@...>, Andrew Morton <akpm@...>, Linus Torvalds <torvalds@...>
Date: Monday, April 2, 2007 - 1:47 pm

On Mon, 2007-04-02 at 10:30 -0700, Davide Libenzi wrote:


Err, the read function 

	ticks = hrtimer_forward(&ctx->tmr, ktime_get(),
                                ctx->tintv);

does give you the number of (lost) ticks.

tmr->expires holds the absolute expiry time of the last event.
hrtimer_forward() adds N intervals to tmr->expires, so that the new
tmr->expires value is greater than now (ktime_get()). It returns N.

So the number of lost ticks is N - 1. No time reading and no magic
math :)

	tglx


-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 6/13] signal/timer/event fds v9 - timerfd core ..., Davide Libenzi, (Sat Mar 31, 4:09 pm)
Re: [patch 6/13] signal/timer/event fds v9 - timerfd core ..., Thomas Gleixner, (Mon Apr 2, 1:47 pm)