lkml.org 
[lkml]   [2008]   [Sep]   [6]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSat, 6 Sep 2008 14:10:32 -0700 (PDT)
FromLinus Torvalds <>
SubjectRe: [RFC patch 0/4] TSC calibration improvements

On Sat, 6 Sep 2008, Thomas Gleixner wrote:
> 
> Where is a guarantee, that excpect is not decremented before we break
> out of the loop ? 

Quite the reverse. We have a guarantee that it _is_ decremented.

Adn that guarantee is very much about the C language.

		for (a ; b ; c) {
			..
		}
translates as

		a;
		while (b) {
			..
	continue:
			c;
		}
And this has absolutely _nothing_ to do with any gcc oddity or anything 
else. 

The fact is, the code that Ingo added was totally bogus. The real bug was 
that he did a totally bogus "--expect" in the argument to that last call. 

Because 'c' *will* have been done after the last iteration of the loop.

			Linus


\
 
 \ /
  Last update: 2008-09-06 23:13    [from the cache]
©2003-2008