From: Nicholas Miell <nmiell@comcast.net>
To: Davide Libenzi <davidel@xmailserver.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [patch 6/9] signalfd/timerfd v1 - timerfd core ...
Date: Fri, 09 Mar 2007 22:33:04 -0800 [thread overview]
Message-ID: <1173508384.3108.1.camel@entropy> (raw)
In-Reply-To: <Pine.LNX.4.64.0703091535360.3761@alien.or.mcafeemobile.com>
On Fri, 2007-03-09 at 15:41 -0800, Davide Libenzi wrote:
> This patch introduces a new system call for timers events delivered
> though file descriptors. This allows timer event to be used with
> standard POSIX poll(2), select(2) and read(2). As a consequence of
> supporting the Linux f_op->poll subsystem, they can be used with
> epoll(2) too.
> The system call is defined as:
>
> int timerfd(int ufd, int tmrtype, const struct timespec *utmr);
>
> The "ufd" parameter allows for re-use (re-programming) of an existing
> timerfd w/out going through the close/open cycle (same as signalfd).
> If "ufd" is -1, s new file descriptor will be created, otherwise the
> existing "ufd" will be re-programmed.
> The "tmrtype" parameter allows to specify the timer type. The following
> values are supported:
>
> TFD_TIMER_REL
> The time specified in the "utmr" parameter is a relative time
> from NOW.
>
> TFD_TIMER_ABS
> The timer specified in the "utmr" parameter is an absolute time.
>
> TFD_TIMER_SEQ
> The time specified in the "utmr" parameter is an interval at
> which a continuous clock rate will be generated.
>
> The function returns the new (or same, in case "ufd" is a valid timerfd
> descriptor) file, or -1 in case of error.
> As stated before, the timerfd file descriptor supports poll(2), select(2)
> and epoll(2). When a timer event happened on the timerfd, a POLLIN mask
> will be returned.
> The read(2) call can be used, and it will return a u32 variable holding
> the number of "ticks" that happened on the interface since the last call
> to read(2). The read(2) call supportes the O_NONBLOCK flag too, and EAGAIN
> will be returned if no ticks happened.
> A quick test program, shows timerfd working correctly on my amd64 box:
>
> http://www.xmailserver.org/timerfd-test.c
>
Why did you ignore the existing POSIX timer API?
--
Nicholas Miell <nmiell@comcast.net>
next prev parent reply other threads:[~2007-03-10 6:33 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-09 23:41 [patch 6/9] signalfd/timerfd v1 - timerfd core Davide Libenzi
2007-03-10 6:33 ` Nicholas Miell [this message]
2007-03-10 6:38 ` Davide Libenzi
2007-03-10 6:43 ` Nicholas Miell
2007-03-10 6:53 ` Davide Libenzi
2007-03-10 7:09 ` Nicholas Miell
2007-03-10 7:36 ` Davide Libenzi
2007-03-10 19:52 ` Nicholas Miell
2007-03-10 20:41 ` Davide Libenzi
2007-03-10 21:01 ` Nicholas Miell
2007-03-10 21:44 ` Linus Torvalds
2007-03-10 21:56 ` Nicholas Miell
2007-03-10 22:42 ` Linus Torvalds
2007-03-11 0:25 ` Nicholas Miell
2007-03-11 0:35 ` Linus Torvalds
2007-03-11 1:49 ` Nicholas Miell
2007-03-11 1:57 ` Davide Libenzi
2007-03-11 2:09 ` Nicholas Miell
2007-03-11 5:31 ` Linus Torvalds
2007-03-11 6:18 ` Nicholas Miell
2007-03-11 16:29 ` Linus Torvalds
2007-03-11 3:42 ` Davide Libenzi
2007-03-11 5:35 ` Linus Torvalds
2007-03-11 5:44 ` Davide Libenzi
2007-03-10 22:30 ` Davide Libenzi
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=1173508384.3108.1.camel@entropy \
--to=nmiell@comcast.net \
--cc=akpm@linux-foundation.org \
--cc=davidel@xmailserver.org \
--cc=linux-kernel@vger.kernel.org \
--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