[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200607181704.09438.mb@bu3sch.de>
Date: Tue, 18 Jul 2006 17:04:08 +0200
From: Michael Buesch <mb@...sch.de>
To: Valdis.Kletnieks@...edu
Cc: linux-kernel@...r.kernel.org, keir@...source.com,
Tony Lindgren <tony@...mide.com>, zach@...are.com,
Ingo Molnar <mingo@...e.hu>,
Thomas Gleixner <tglx@...utronix.de>,
Andreas Mohr <andi@...x01.fht-esslingen.de>
Subject: Re: kernel/timer.c: next_timer_interrupt() strange/buggy(?) code (2.6.18-rc1-mm2)
On Tuesday 18 July 2006 16:50, Valdis.Kletnieks@...edu wrote:
> On Tue, 18 Jul 2006 16:29:27 +0200, Michael Buesch said:
>
> > Continue is equal to:
> >
> > LOOP {
> > /* foo */
> > goto continue; /* == continue */
> /* What the code actually had: */
> goto found; /* Note placement of the label *AFTER* end of loop */
> > /* foo */
> > continue:
> > } LOOP
>
> found: /* out of the loop entirely */
>
> A 'continue' drops you *at* the end of the loop. The 'goto found:' in the
> original code drops you *after* the end of the loop. One will potentially go
> around for another pass, the other you're *done*.
I did not say something else.
I just wanted to say the sentence
> A 'continue' instead would leave the do/while and then
> drive the i==2 and subsequent 'for' iterations....
is wrong. It would _not_ leave the do/while directly.
It will check condition first and _might_ leave it.
--
Greetings Michael.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists