* [PATCH] Documentation: improvement to volatile considered harmful
@ 2007-06-26 14:30 Heikki Orsila
0 siblings, 0 replies; only message in thread
From: Heikki Orsila @ 2007-06-26 14:30 UTC (permalink / raw)
To: Linux Kernel Mailing List
Kernel locking/synchronization primitives are better than volatile types
from code readability point of view also.
This patch is against 2.6.22-rc6.
Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi>
diff --git a/Documentation/volatile-considered-harmful.txt b/Documentation/volatile-considered-harmful.txt
index 10c2e41..ab9e62e 100644
--- a/Documentation/volatile-considered-harmful.txt
+++ b/Documentation/volatile-considered-harmful.txt
@@ -17,8 +17,9 @@ all optimization-related problems in a more efficient way.
Like volatile, the kernel primitives which make concurrent access to data
safe (spinlocks, mutexes, memory barriers, etc.) are designed to prevent
-unwanted optimization. If they are being used properly, there will be no
-need to use volatile as well. If volatile is still necessary, there is
+unwanted optimization. If they are being used properly, there will be no
+need to use volatile as well. Also, they make code more readable as they
+represent their intent explicitly. If volatile is still necessary, there is
almost certainly a bug in the code somewhere. In properly-written kernel
code, volatile can only serve to slow things down.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-06-26 14:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-26 14:30 [PATCH] Documentation: improvement to volatile considered harmful Heikki Orsila
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®