Re: Man page for revised timerfd API

Davide Libenzi
2007-09-27T16:45:46Z

On Thu, 27 Sep 2007, Michael Kerrisk wrote:

> Davide,
>
> A further question: what is the expected behavior in the
> following scenario:
>
> 1. Create a timerfd and arm it.
> 2. Wait until M timer expirations have occurred
> 3. Modify the settings of the timer
> 4. Wait for N further timer expirations have occurred
> 5. read() from the timerfd
>
> Does the buffer returned by the read() contain the value
> N or (M+N)? In other words, should modifying the timer
> settings reset the expiration count to zero?

Every timerfd_settime() zeroes the tick counter. So in your scenario it'll
return N.

- Davide