Re: time_is_after_jiffies misnomer

From: Chris Friesen
Date: Tue Dec 16 2008 - 14:30:22 EST


Peter T. Breuer wrote:

Forgive me, but you don't seem to really be taking it on board here
either ... what it SAYS to an english reader is the opposite of what
you intend it to MEAN, unfortunately :(.

time_is_after_jiffies(foo) means: time "foo" is after the current value of the variable "jiffies" (which is used throughout the kernel as the current time).

You are interpreting it as: the current time is after time "foo" (which is in jiffies).

The reason why your interpretation is incorrect is that "jiffies" is a specific variable in and of itself, and not a modifier for "foo".

So how about keeping the current macro
names but gradually phasing them out in favour of a parallel set of alternatives, which could be

current_time_is_before_jiffies(foo)

?? That reads fine in english and this time it means what it says!


You're using "jiffies" as a modifier for "foo", when it is actually a separate variable. This makes your version just as ambiguous.

If you really want to change it, removing "jiffies" from the name (and thus removing any ambiguity) may make more sense. Something like:

time_is_after(foo)

which would mean that the current value of "jiffies" is after "foo".

Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/