Re: [QUESTION] init/main.c

From: Bart Trojanowski (bart@jukie.net)
Date: Fri Apr 13 2001 - 18:40:44 EST


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/



This archive was generated by hypermail 2b29 : Sun Apr 15 2001 - 21:00:22 EST