[lkml]   [2006]   [Jul]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch] spinlocks: remove 'volatile'

> > This is a bait and switch argument. The code was displayed to show
> > the compiler output, not an example of good coding practice.
> The whole point of my argument is simple:
> > > "'volatile' is useless. The things it did 30 years ago are much
> > > more complex these days, and need to be tied to much more
> > > detailed rules that depend on the actual particular problem,
> > > rather than one keyword to the compiler that doesn't actually
> > > give enough information for the compiler to do anything useful"
> And dammit, if you cannot admit that, then you're not worth discussing
> with.
> "volatile" is useless. It's a big hammer in a world where the nails aren't
> nails any more, they are screws, thumb-tacks, and spotwelding.

Actually, because volatile is big hammer, it can be used to work
around compiler bugs. If compiler dies at internal error in function
foo, just sprinkle few volatiles into it, and you can usually work
around that compiler problem.
(cesky, pictures)
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-07-08 22:53    [W:0.225 / U:0.968 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site