aboutsummaryrefslogtreecommitdiff
path: root/sys/sparc64
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2013-06-15 08:23:53 +0000
committerEd Schouten <ed@FreeBSD.org>2013-06-15 08:23:53 +0000
commiteaa3b76d1a94112b92cb918d7eac3f5b7462534b (patch)
tree05ab7a2840e7f37e7a016641a8006e0b307833ec /sys/sparc64
parent1f7e35dce5175d65e2c718772bf8f31775d43f29 (diff)
downloadsrc-eaa3b76d1a94112b92cb918d7eac3f5b7462534b.tar.gz
src-eaa3b76d1a94112b92cb918d7eac3f5b7462534b.zip
Remove conflicting macros from SPARC64's atomic(9) header.
The atomic_load() and atomic_store() macros conflict with the equally named macros from <stdatomic.h>. Remove them, as they are only used to implement functions that are not present on any of the other architectures.
Notes
Notes: svn path=/head/; revision=251783
Diffstat (limited to 'sys/sparc64')
-rw-r--r--sys/sparc64/include/atomic.h18
1 files changed, 3 insertions, 15 deletions
diff --git a/sys/sparc64/include/atomic.h b/sys/sparc64/include/atomic.h
index 447880a4fa9d..93ddf761d97b 100644
--- a/sys/sparc64/include/atomic.h
+++ b/sys/sparc64/include/atomic.h
@@ -133,12 +133,9 @@
t; \
})
-#define atomic_load(p, sz) \
- atomic_cas((p), 0, 0, sz)
-
#define atomic_load_acq(p, sz) ({ \
itype(sz) v; \
- v = atomic_load((p), sz); \
+ v = atomic_cas((p), 0, 0, sz); \
__compiler_membar(); \
v; \
})
@@ -153,8 +150,9 @@
e; \
})
-#define atomic_store(p, v, sz) do { \
+#define atomic_store_rel(p, v, sz) do { \
itype(sz) e, r; \
+ membar(LoadStore | StoreStore); \
for (e = *(volatile itype(sz) *)(p);; e = r) { \
r = atomic_cas((p), e, (v), sz); \
if (r == e) \
@@ -162,11 +160,6 @@
} \
} while (0)
-#define atomic_store_rel(p, v, sz) do { \
- membar(LoadStore | StoreStore); \
- atomic_store((p), (v), sz); \
-} while (0)
-
#define ATOMIC_GEN(name, ptype, vtype, atype, sz) \
\
static __inline vtype \
@@ -267,11 +260,6 @@ atomic_subtract_rel_ ## name(volatile ptype p, atype v) \
} \
\
static __inline void \
-atomic_store_ ## name(volatile ptype p, vtype v) \
-{ \
- atomic_store((p), (v), sz); \
-} \
-static __inline void \
atomic_store_rel_ ## name(volatile ptype p, vtype v) \
{ \
atomic_store_rel((p), (v), sz); \