aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/rcupdate.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-05-10 22:51:16 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-05-10 22:51:16 -0400
commit9c3cdc1f83a6e07092392ff4aba6466517dbd1d0 (patch)
tree4dc890f607da4f85ca3a66770e4bce109879e69b /include/linux/rcupdate.h
parent3ed43c745d2ce0c4ca15ad406285d1cc7e8ceec3 (diff)
Move ACCESS_ONCE() to <linux/compiler.h>
It actually makes much more sense there, and we do tend to need it for non-RCU usage too. Moving it to <linux/compiler.h> will allow some other cases that have open-coded the same logic to use the same helper function that RCU has used. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/rcupdate.h')
-rw-r--r--include/linux/rcupdate.h12
1 files changed, 0 insertions, 12 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 8082d6587a0f..d42dbec06083 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -131,18 +131,6 @@ struct rcu_head {
131 */ 131 */
132#define rcu_read_unlock_bh() __rcu_read_unlock_bh() 132#define rcu_read_unlock_bh() __rcu_read_unlock_bh()
133 133
134/*
135 * Prevent the compiler from merging or refetching accesses. The compiler
136 * is also forbidden from reordering successive instances of ACCESS_ONCE(),
137 * but only when the compiler is aware of some particular ordering. One way
138 * to make the compiler aware of ordering is to put the two invocations of
139 * ACCESS_ONCE() in different C statements.
140 *
141 * This macro does absolutely -nothing- to prevent the CPU from reordering,
142 * merging, or refetching absolutely anything at any time.
143 */
144#define ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x))
145
146/** 134/**
147 * rcu_dereference - fetch an RCU-protected pointer in an 135 * rcu_dereference - fetch an RCU-protected pointer in an
148 * RCU read-side critical section. This pointer may later 136 * RCU read-side critical section. This pointer may later