提交 d356b595 编写于 作者: C Chris Metcalf

arch/tile: Fix atomic_read() definition to use ACCESS_ONCE

This adds the volatile cast which forces the compiler to emit the load.
Suggested by Peter Zijlstra <peterz@infradead.org>.
Signed-off-by: NChris Metcalf <cmetcalf@tilera.com>
上级 deb4b003
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
*/ */
static inline int atomic_read(const atomic_t *v) static inline int atomic_read(const atomic_t *v)
{ {
return v->counter; return ACCESS_ONCE(v->counter);
} }
/** /**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册