aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorNikanth Karthikesan <knikanth@suse.de>2011-05-26 19:25:13 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-26 20:12:34 -0400
commit72eef0f3af410de2c85f236140ddea61b71cfc3e (patch)
treee2ceccb88da76028c65c158609328786253cdee9 /Documentation
parent1d5827235de48e829d5d4a03c3688ef6f2b15562 (diff)
Documentation/atomic_ops.txt: avoid volatile in sample code
As declaring counter as volatile is discouraged, it is best not to use it in sample code as well. Signed-off-by: Nikanth Karthikesan <knikanth@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/atomic_ops.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/Documentation/atomic_ops.txt b/Documentation/atomic_ops.txt
index ac4d47187122..3bd585b44927 100644
--- a/Documentation/atomic_ops.txt
+++ b/Documentation/atomic_ops.txt
@@ -12,7 +12,7 @@ Also, it should be made opaque such that any kind of cast to a normal
12C integer type will fail. Something like the following should 12C integer type will fail. Something like the following should
13suffice: 13suffice:
14 14
15 typedef struct { volatile int counter; } atomic_t; 15 typedef struct { int counter; } atomic_t;
16 16
17Historically, counter has been declared volatile. This is now discouraged. 17Historically, counter has been declared volatile. This is now discouraged.
18See Documentation/volatile-considered-harmful.txt for the complete rationale. 18See Documentation/volatile-considered-harmful.txt for the complete rationale.