From: Michael Kerrisk <mtk-manpages@gmx.net>
To: Davide Libenzi <davidel@xmailserver.org>
Cc: Jonathan Corbet <corbet@lwn.net>,
Thomas Gleixner <tglx@linutronix.de>,
Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [patch 2/4] new timerfd API v2 - new timerfd API
Date: Wed, 26 Sep 2007 09:14:14 +0200 [thread overview]
Message-ID: <46FA06C6.5090703@gmx.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0709251035330.9111@alien.or.mcafeemobile.com>
Davide Libenzi wrote:
> On Tue, 25 Sep 2007, Jonathan Corbet wrote:
>
>> One quick question:
>>
>>> Like the previous timerfd API implementation, read(2) and poll(2) are supported
>>> (with the same interface).
>> Looking at that interface, it appears that a process doing a read() on a
>> timerfd with no timer set will block for a very long time. It's an
>> obvious "don't do that" situation, but perhaps we could help an
>> occasional developer get a clue by returning something like -EINVAL when
>> the timer has not been set?
>
> That is the same as you try to read once more after an expired timer. You
> won't wake up until the next timer event will show up. That is, after at
> most TP time for periodic timers, or after the time the next
> timerfd_settime() will setup.
> I'd like to keep the "timerfd not set yet" and the "timerfd already
> expired and not re-armed" acting the same way. That is, wait till next
> event happen (unless O_NONBLOCK of course).
Yes. The timer_settime() and read() might for example be done in separate
threads, and it would make sense for the read() to block until the timer
has been armed.
Cheers,
Michael
--
Michael Kerrisk
maintainer of Linux man pages Sections 2, 3, 4, 5, and 7
Want to help with man page maintenance? Grab the latest tarball at
http://www.kernel.org/pub/linux/docs/manpages/
read the HOWTOHELP file and grep the source files for 'FIXME'.
prev parent reply other threads:[~2007-09-26 7:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-24 20:22 [patch 2/4] new timerfd API v2 - new timerfd API Davide Libenzi
2007-09-24 22:50 ` roel
2007-09-25 16:40 ` Jonathan Corbet
2007-09-25 17:41 ` Davide Libenzi
2007-09-26 7:14 ` Michael Kerrisk [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46FA06C6.5090703@gmx.net \
--to=mtk-manpages@gmx.net \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=davidel@xmailserver.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.