Re: RFC: A revised timerfd API

Michael Kerrisk
2007-09-23T19:03:17Z

Davide Libenzi wrote:
> On Sun, 23 Sep 2007, Davide Libenzi wrote:
>
>> On Sun, 23 Sep 2007, Michael Kerrisk wrote:
>>
>>> I applied this patch against 2.6.27-rc7, and wired up the syscalls as shown
>>> in the definitions below. When I ran the the program below, my system
>>> immediately froze. Can you try it on your system please.
>> There's an hrtimer_init() missing in timerfd_create(). I'll refactor the
>> patch.
>
> There's the case of a timerfd_gettime return status when the timerfd has
> not been set yet (ie, soon after a timerfd_create), to handle.
> Current way is to return an (itimerspec) { 0, 0 }. Ok?

Seems reasonable. In the analogous situation, the POSIX timers API
returns a structure containing all zeros, at least on Linux.