All of lore.kernel.org
 help / color / mirror / Atom feed
From: george anzinger <george@mvista.com>
To: sebastien person <sebastien.person@sycomore.fr>
Cc: liste noyau linux <linux-kernel@vger.kernel.org>
Subject: Re: [timer] max timeout
Date: Fri, 25 May 2001 13:58:46 -0700	[thread overview]
Message-ID: <3B0EC786.D7B65706@mvista.com> (raw)
In-Reply-To: <20010523162801.38dabdff.sebastien.person@sycomore.fr>

sebastien person wrote:
> 
> Hi,
> 
> is there a max timeout to respect when I use mod_timer ? or add_timer ?
> 
> Is it bad to do the following call ?
> 
>         mod_timer(&timer, jiffies+(0.1*HZ));
> 
> that might fire the timer 1/10 second later.
> 
> Thanks.
> 
More than enough on the fp.  Now the other question.  

The time value is in jiffies (aka 1/Hz sec.).  The max value (in a 32
bit system) is 0x7ffffff.  This value is added to the current value of
jiffies to get the the absolute timer expire time.  While the value is
unsigned (and thus you could go higher) the compare code (timer_before()
and timer_after()) depend on the subtraction (of jiffies from expire) to
be of the correct sign.  To insure this you must keep the timeout values
sign clear (or if you don't like to think of an unsigned as having a
sign, then the highest order bit must be zero).

George

  parent reply	other threads:[~2001-05-25 20:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-23 14:28 [timer] max timeout sebastien person
2001-05-23 14:38 ` Andi Kleen
2001-05-23 14:58 ` Andrzej Krzysztofowicz
2001-05-25  8:24   ` sebastien person
2001-05-25 20:58 ` george anzinger [this message]
2001-05-25 21:26   ` Mark Frazer
2001-05-25 21:45     ` Horst von Brand

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=3B0EC786.D7B65706@mvista.com \
    --to=george@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sebastien.person@sycomore.fr \
    /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.