git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
atomic_t: Cast to volatile when accessing atomic variables
[safe/jmp/linux-2.6]
/
include
/
asm-generic
/
atomic.h
diff --git
a/include/asm-generic/atomic.h
b/include/asm-generic/atomic.h
index
c99c64d
..
c33749f
100644
(file)
--- a/
include/asm-generic/atomic.h
+++ b/
include/asm-generic/atomic.h
@@
-33,7
+33,7
@@
* Atomically reads the value of @v. Note that the guaranteed
* useful range of an atomic_t is only 24 bits.
*/
-#define atomic_read(v) ((v)->counter)
+#define atomic_read(v) (
*(volatile int *)&
(v)->counter)
/**
* atomic_set - set atomic variable