From: Davide Libenzi <davidel@xmailserver.org>
To: Jonathan Corbet <corbet@lwn.net>
Cc: Michael Kerrisk <mtk-manpages@gmx.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: Tue, 25 Sep 2007 10:41:47 -0700 (PDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0709251035330.9111@alien.or.mcafeemobile.com> (raw)
In-Reply-To: <12492.1190738426@lwn.net>
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).
- Davide
next prev parent reply other threads:[~2007-09-25 17:42 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-24 20:22 Davide Libenzi
2007-09-24 22:50 ` roel
2007-09-25 16:40 ` Jonathan Corbet
2007-09-25 17:41 ` Davide Libenzi [this message]
2007-09-26 7:14 ` Michael Kerrisk
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=Pine.LNX.4.64.0709251035330.9111@alien.or.mcafeemobile.com \
--to=davidel@xmailserver.org \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=linux-kernel@vger.kernel.org \
--cc=mtk-manpages@gmx.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®