Re: [PATCH] doc: volatile considered evil

Randy Dunlap
2007-05-09T02:03:53Z

On Tue, 8 May 2007 17:06:23 -0700 (PDT) David Rientjes wrote:

> On Tue, 8 May 2007, Randy Dunlap wrote:
>
> > From: Randy Dunlap <randy.dunlap@oracle.com>
> >
> > Add information on the problems with the C-language "volatile" keyword
> > and why it should not be used (most of the time).
> >
> > Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
> > ---
> > Documentation/volatile-usage.txt | 129 +++++++++++++++++++++++++++++++++++++++
> > 1 file changed, 129 insertions(+)
> >
> > --- /dev/null
> > +++ linux-2.6.21-git10/Documentation/volatile-usage.txt
> > @@ -0,0 +1,129 @@
> > +***** "volatile" considered useless and evil: Just Say NO! *****
> > +
> > +Do not use the C-language "volatile" keyword
> > +(extracted from lkml emails from Linus)
> > +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > +
>
> Again, please change this sweeping introduction to explicitly state that
> Linus' emails were a criticism of using 'volatile' for objects (he refers
> to them as "data structures") and can be appropriate for asm constructs.

You haven't replied to my other emails...

"volatile" used on a gcc asm extension is different, granted.
It's not even a C-language "volatile" keyword AFAICT, so it doesn't
apply in this context.

Anyway, how is this slightly modified title?

+***** "volatile" considered useless and evil: Just Say NO! *****
+
+Do not use the C-language "volatile" keyword on kernel data
+(extracted from lkml emails from Linus)

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***