lkml.org 
[lkml]   [2006]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] spinlocks: remove 'volatile'


On Thu, 6 Jul 2006, Jan Engelhardt wrote:
> >
> > You need to exclude "asm volatile", which is a completely different thing.
>
> 10077.

Yeah, way too many.

That said, at least _some_ of them are:

- casts to volatile inside arch-specific code serquences (ie the _good_
kind of volatile - associated with _code_ rather than data).

See for example include/asm-i386/io.h for 100% valid examples of this
kind of usage.

- function argument values for functions that need to be able to take an
arbitrary pointer ("const volatile void *" is the most permissive
argument type - anything else the compiler can complain about you
dropping qualifiers)

See include/asm-i386/bitops.h for examples of this kind of volatile.

So I'd expect that maybe one percent of them are actually valid ;)

And I suspect that a huge majority of the truly crapola ones are in
drivers. Oh, well..

Linus
-
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/

\
 
 \ /
  Last update: 2009-11-18 23:46    [W:0.094 / U:0.776 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site