lkml.org 
[lkml]   [2001]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [QUESTION] init/main.c

jiffies is updated by a timer interrupt once every 1/HZ seconds (HZ==100
for i386).

The code intents to start running at the time right after jiffies was
incremented to improve the correctness of the delay calibration loop.

The reason why jiffies is read later is to get the value after the
change... if the interrupts are sporadic then the increment could be 2 ...
although not very likely.

Bart.

On Fri, 13 Apr 2001, Thiago Rondon wrote:

>
> At function calibrate_delay(void) in init/main.c,
> I dont understand this code:
>
> <<EOF
> /* wait for "start of" clock tick */
> ticks = jiffies;
> while (ticks == jiffies)
> /* nothing */;
> /* Go .. */
>
> ticks = jiffies;
> EOF
>
> ticks = jiffies; while (ticks == jiffies); ticks = jiffies; ?
>
> Thanks in advanced,
> -Thiago Rondon
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>

--
WebSig: http://www.jukie.net/~bart/sig/

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

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