mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Davide Libenzi <davidel@xmailserver.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Michael Kerrisk <mtk-manpages@gmx.net>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [patch 1/4] new timerfd API v2 - introduce a new hrtimer_forward_now() function
Date: Mon, 24 Sep 2007 22:28:05 +0200	[thread overview]
Message-ID: <1190665685.4035.249.camel@chaos> (raw)
In-Reply-To: <send-serie.davidel@xmailserver.org.3854.1190665357.1>


On Mon, 2007-09-24 at 13:22 -0700, Davide Libenzi wrote:
> I think that advancing the timer against the timer's current "now" can
> be a pretty common usage, so, w/out exposing hrtimer's internals, we add
> a new hrtimer_forward_now() function.
> 
> 
> 
> Signed-off-by: Davide Libenzi <davidel@xmailserver.org>

Reviewed-and-Acked-by: Thomas Gleixner <tglx@linutronix.de>

> 
> - Davide
> 
> 
> ---
>  include/linux/hrtimer.h |    7 +++++++
>  1 file changed, 7 insertions(+)
> 
> Index: linux-2.6.mod/include/linux/hrtimer.h
> ===================================================================
> --- linux-2.6.mod.orig/include/linux/hrtimer.h	2007-09-24 12:27:20.000000000 -0700
> +++ linux-2.6.mod/include/linux/hrtimer.h	2007-09-24 12:29:39.000000000 -0700
> @@ -298,6 +298,13 @@
>  extern unsigned long
>  hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval);
>  
> +/* Forward a hrtimer so it expires after the hrtimer's current now */
> +static inline unsigned long hrtimer_forward_now(struct hrtimer *timer,
> +						ktime_t interval)
> +{
> +	return hrtimer_forward(timer, timer->base->get_time(), interval);
> +}
> +
>  /* Precise sleep: */
>  extern long hrtimer_nanosleep(struct timespec *rqtp,
>  			      struct timespec __user *rmtp,
> 


      reply	other threads:[~2007-09-24 20:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-24 20:22 Davide Libenzi
2007-09-24 20:28 ` Thomas Gleixner [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=1190665685.4035.249.camel@chaos \
    --to=tglx@linutronix.de \
    --cc=akpm@linux-foundation.org \
    --cc=davidel@xmailserver.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtk-manpages@gmx.net \
    --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®