mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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 <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
e40152ee1e
commit
f3d46f9d31
20 changed files with 25 additions and 25 deletions
|
|
@ -36,7 +36,7 @@
|
|||
#define smp_mb__after_atomic_inc() barrier()
|
||||
|
||||
#define ATOMIC_INIT(i) { (i) }
|
||||
#define atomic_read(v) ((v)->counter)
|
||||
#define atomic_read(v) (*(volatile int *)&(v)->counter)
|
||||
#define atomic_set(v, i) (((v)->counter) = (i))
|
||||
|
||||
#ifndef CONFIG_FRV_OUTOFLINE_ATOMIC_OPS
|
||||
|
|
|
|||
Loading…
Reference in a new issue