* [QUESTION] init/main.c
@ 2001-04-13 23:21 Thiago Rondon
2001-04-13 23:40 ` Bart Trojanowski
2001-04-14 5:44 ` Jonathan Morton
0 siblings, 2 replies; 3+ messages in thread
From: Thiago Rondon @ 2001-04-13 23:21 UTC (permalink / raw)
To: lkml; +Cc: Michael A. Griffith
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [QUESTION] init/main.c
2001-04-13 23:21 [QUESTION] init/main.c Thiago Rondon
@ 2001-04-13 23:40 ` Bart Trojanowski
2001-04-14 5:44 ` Jonathan Morton
1 sibling, 0 replies; 3+ messages in thread
From: Bart Trojanowski @ 2001-04-13 23:40 UTC (permalink / raw)
To: Thiago Rondon; +Cc: lkml, Michael A. Griffith
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/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [QUESTION] init/main.c
2001-04-13 23:21 [QUESTION] init/main.c Thiago Rondon
2001-04-13 23:40 ` Bart Trojanowski
@ 2001-04-14 5:44 ` Jonathan Morton
1 sibling, 0 replies; 3+ messages in thread
From: Jonathan Morton @ 2001-04-14 5:44 UTC (permalink / raw)
To: Thiago Rondon, lkml; +Cc: Michael A. Griffith
>ticks = jiffies; while (ticks == jiffies); ticks = jiffies; ?
jiffies is updated by an interrupt routine, I think.
--------------------------------------------------------------
from: Jonathan "Chromatix" Morton
mail: chromi@cyberspace.org (not for attachments)
big-mail: chromatix@penguinpowered.com
uni-mail: j.d.morton@lancaster.ac.uk
The key to knowledge is not to rely on people to teach you it.
Get VNC Server for Macintosh from http://www.chromatix.uklinux.net/vnc/
-----BEGIN GEEK CODE BLOCK-----
Version 3.12
GCS$/E/S dpu(!) s:- a20 C+++ UL++ P L+++ E W+ N- o? K? w--- O-- M++$ V? PS
PE- Y+ PGP++ t- 5- X- R !tv b++ DI+++ D G e+ h+ r++ y+(*)
-----END GEEK CODE BLOCK-----
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2001-04-14 6:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-13 23:21 [QUESTION] init/main.c Thiago Rondon
2001-04-13 23:40 ` Bart Trojanowski
2001-04-14 5:44 ` Jonathan Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®