> The formula time_after(jiffies, least_reset + MIN_RESET_PERIOD) looks
> like very poor semantic to me. I donnot even want to ever burn a
> single neuron to understand it.
time_before(x,y) means: 'is x before y?'.
time_after(x,y) means: 'is x after y?'.
where both values are 'time' represented as signed integers.
> I may want to understand something that looks like the following:
> is_in_the_future(u_long time_stamp_in_the_past, u_long delay)
you can always add integers to time. The only thing that has to be wrapped
is comparison. Thus:
x+d means: 'd units after x'
x-d means: 'd units before x'
the whole concept is that we are representing a 'time ring' via signed
integers, but integer comparison in C is not type safe, so we have to wrap
it.
-- mingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/