LKML Archive on
help / color / mirror / Atom feed
From: Alan Cox <>
To: "Dave Young" <>
Cc: "Johannes Weiner" <>,,
Subject: Re: [PATCH v2] add time_now_after and other macros which compare with jiffies
Date: Sun, 9 Mar 2008 09:58:02 +0000	[thread overview]
Message-ID: <20080309095802.70d91c7b@core> (raw)
In-Reply-To: <>

> >  > +/* time_now_before_eq(a) return true if now (jiffies) is before or equal to a */
> >  > +#define time_now_before_eq(a) time_before_eq(jiffies, a)
> >
> >  How about even more obvious names like time_is_past(), time_is_future(),
> >  ...?
> Thanks for comment.
> Then how do we name the _eq version?  IMHO, the time_now_* is enough.

Why do you even need them. I don't see the point of *any* of these extra
macros as they simply obfuscate code and hide what is actually going on.
The initial macros were added because of the type safety and correct
comparison rules being complex. They have a purpose.

Even if you want these you can use !time_future() if you don't want the
_eq variants. Generally speaking drivers should be using timers not
polled loops, and most of our loops comparing with jiffies want removing.


  reply	other threads:[~2008-03-09 10:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-07 23:35 Dave Young
2008-03-08 16:12 ` Johannes Weiner
2008-03-09  0:54   ` Dave Young
2008-03-09  9:58     ` Alan Cox [this message]
2008-03-09 10:44       ` Dave Young
2008-03-09 11:08         ` Alan Cox
2008-03-09 19:01           ` Andrew Morton
2008-03-09 20:06             ` Alan Cox
2008-03-10  2:03             ` Dave Young
2008-03-10  2:41               ` Johannes Weiner
2008-03-09 18:36       ` Andrew Morton
2008-03-09 20:03         ` Alan Cox

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080309095802.70d91c7b@core \ \ \ \ \ \
    --subject='Re: [PATCH v2] add time_now_after and other macros which compare with jiffies' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).