[lkml]   [2007]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] "volatile considered harmful", take 2
Jonathan Corbet wrote:
> +The key point to understand with regard to volatile is that its purpose is
> +to suppress optimization, which is almost never what one really wants to
> +do. In the kernel, one must protect shared data structures against
> +unwanted concurrent access, which is very much a different task. As it
> +happens, once the critical sections are properly implemented, the compiler
> +optimization issues which volatile was added to prevent will have been
> +taken care of in a more efficient way.

The "As it happens... efficient way." sentence is hard to read: It is
long and nested like in German, combined with several English
ambiguities (e.g. WRT noun vs. verb vs. adjective). Maybe just leave
this sentence out, as it is redundant to later statements like "In
properly-written kernel code, volatile can only serve to slow things down".
Stefan Richter
-=====-=-=== -=-= -=-==
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: 2007-05-11 13:21    [W:0.054 / U:1.092 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site