mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Davide Libenzi <davidel@xmailserver.org>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [patch 6/9] signalfd/timerfd v3 - timerfd core ...
Date: Sun, 11 Mar 2007 16:13:33 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0703111610360.4936@alien.or.mcafeemobile.com> (raw)
In-Reply-To: <send-serie.davidel@xmailserver.org.5031.1173654242.6>

On Sun, 11 Mar 2007, 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 clockid, 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 "clockid" parameter is either CLOCK_MONOTONIC or CLOCK_REALTIME.
> 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.
> 

Duh! Forgot to update the documenation. Now timerfd() gets an itimerspec.
For TFD_TIMER_REL only the it_interval is valid, and it's the relative 
time. For TFD_TIMER_ABS, only the it_value is valid, and that the expiry 
absolute time. For TFD_TIMER_SEQ, it_value tells when the first tick 
should be generated, and it_interval tells the period of the following 
ticks.



- Davide


  reply	other threads:[~2007-03-11 23:13 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-11 23:04 Davide Libenzi
2007-03-11 23:13 ` Davide Libenzi [this message]
2007-03-11 23:50   ` Nicholas Miell
2007-03-11 23:52     ` Nicholas Miell
2007-03-12  0:16     ` Davide Libenzi
2007-03-12 10:19 ` Thomas Gleixner
2007-03-12 18:46   ` Davide Libenzi
2007-03-12 19:00     ` 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=Pine.LNX.4.64.0703111610360.4936@alien.or.mcafeemobile.com \
    --to=davidel@xmailserver.org \
    --cc=akpm@linux-foundation.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 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®