rcu: Convert ACCESS_ONCE() to READ_ONCE() and WRITE_ONCE()
This commit moves from the old ACCESS_ONCE() API to the new READ_ONCE() and WRITE_ONCE() APIs. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> [ paulmck: Updated to include kernel/torture.c as suggested by Jason Low. ]
This commit is contained in:
@@ -29,8 +29,8 @@
|
||||
*/
|
||||
static inline void INIT_LIST_HEAD_RCU(struct list_head *list)
|
||||
{
|
||||
ACCESS_ONCE(list->next) = list;
|
||||
ACCESS_ONCE(list->prev) = list;
|
||||
WRITE_ONCE(list->next, list);
|
||||
WRITE_ONCE(list->prev, list);
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -288,7 +288,7 @@ static inline void list_splice_init_rcu(struct list_head *list,
|
||||
#define list_first_or_null_rcu(ptr, type, member) \
|
||||
({ \
|
||||
struct list_head *__ptr = (ptr); \
|
||||
struct list_head *__next = ACCESS_ONCE(__ptr->next); \
|
||||
struct list_head *__next = READ_ONCE(__ptr->next); \
|
||||
likely(__ptr != __next) ? list_entry_rcu(__next, type, member) : NULL; \
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user