lkml.org 
[lkml]   [1996]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Jiffies Wraparound (was Re: interrupt counts)
Date
> IMHO, we either should forget about it and wait for Merced or anything
> else to move us out of the 32 bit world ... or we should completely avoid
> comparing "jiffies" to variables. We could do this the following way:
>
> #define IS_TIMED_OUT(timeout) (jiffies>timeout) || \
> (timeout-jiffies>MAX_JIFFIES/2)

Just rewriting tests from

timeout = jiffies + delay;
while (jifies < timeout) continue;

to

start = jiffies;
while (jiffies - start < delay) continue;

solves the problem, and is much faster.


r~

\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.067 / U:0.308 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site