projects
/
userspace-rcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
uatomic: update atomic set/read, use STORE_SHARED/LOAD_SHARED
[userspace-rcu.git]
/
urcu
/
uatomic_arch_ppc.h
diff --git
a/urcu/uatomic_arch_ppc.h
b/urcu/uatomic_arch_ppc.h
index 68b5faaf7c0510f41455bb4ac1b08edbccda8102..08a622dfe6f93cd547b0684ebfd398bf9284fe92 100644
(file)
--- a/
urcu/uatomic_arch_ppc.h
+++ b/
urcu/uatomic_arch_ppc.h
@@
-21,6
+21,7
@@
*/
#include <urcu/compiler.h>
*/
#include <urcu/compiler.h>
+#include <urcu/system.h>
#ifndef __SIZEOF_LONG__
#ifdef __powerpc64__
#ifndef __SIZEOF_LONG__
#ifdef __powerpc64__
@@
-36,12
+37,8
@@
#define ILLEGAL_INSTR ".long 0xd00d00"
#define ILLEGAL_INSTR ".long 0xd00d00"
-#define uatomic_set(addr, v) \
-do { \
- ACCESS_ONCE(*(addr)) = (v); \
-} while (0)
-
-#define uatomic_read(addr) ACCESS_ONCE(*(addr))
+#define uatomic_set(addr, v) STORE_SHARED(*(addr), (v))
+#define uatomic_read(addr) LOAD_SHARED(*(addr))
/*
* Using a isync as second barrier for exchange to provide acquire semantic.
/*
* Using a isync as second barrier for exchange to provide acquire semantic.
This page took
0.022625 seconds
and
4
git commands to generate.