diff options
author | Anton Blanchard <anton@samba.org> | 2010-05-17 08:33:53 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-17 18:57:27 +0400 |
commit | f3d46f9d3194e0329216002a8724d4c0957abc79 (patch) | |
tree | 6d9413e4a448d7b8d342c40297c4fbe0b9c4c2f0 /arch/xtensa/include | |
parent | e40152ee1e1c7a63f4777791863215e3faa37a86 (diff) | |
download | linux-f3d46f9d3194e0329216002a8724d4c0957abc79.tar.xz |
atomic_t: Cast to volatile when accessing atomic variables
In preparation for removing volatile from the atomic_t definition, this
patch adds a volatile cast to all the atomic read functions.
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/xtensa/include')
-rw-r--r-- | arch/xtensa/include/asm/atomic.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/xtensa/include/asm/atomic.h b/arch/xtensa/include/asm/atomic.h index 22d6dde42619..a96a0619d0b7 100644 --- a/arch/xtensa/include/asm/atomic.h +++ b/arch/xtensa/include/asm/atomic.h @@ -46,7 +46,7 @@ * * Atomically reads the value of @v. */ -#define atomic_read(v) ((v)->counter) +#define atomic_read(v) (*(volatile int *)&(v)->counter) /** * atomic_set - set atomic variable |