projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1d58272
)
Documentation/atomic_ops.txt: avoid volatile in sample code
author
Nikanth Karthikesan
<
[email protected]
>
Thu, 26 May 2011 23:25:13 +0000
(16:25 -0700)
committer
Linus Torvalds
<
[email protected]
>
Fri, 27 May 2011 00:12:34 +0000
(17:12 -0700)
As declaring counter as volatile is discouraged, it is best not to use it
in sample code as well.
Signed-off-by: Nikanth Karthikesan <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
Documentation/atomic_ops.txt
patch
|
blob
|
history
diff --git
a/Documentation/atomic_ops.txt
b/Documentation/atomic_ops.txt
index ac4d47187122f93fc860db817a9d8970bbc80002..3bd585b449270afe15e8a439cef612a0a696ddef 100644
(file)
--- 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
C integer type will fail. Something like the following should
suffice:
- typedef struct {
volatile
int counter; } atomic_t;
+ typedef struct { int counter; } atomic_t;
Historically, counter has been declared volatile. This is now discouraged.
See Documentation/volatile-considered-harmful.txt for the complete rationale.