summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2013-06-15 08:23:53 +0000
committered <ed@FreeBSD.org>2013-06-15 08:23:53 +0000
commit1fdf0e5b3c9f3f1c562253bf991879774e6a7e9c (patch)
tree05ab7a2840e7f37e7a016641a8006e0b307833ec /sys/sparc64
parent13f575ad68c2aec3fce74b3757e2eec57b2ceb70 (diff)
downloadFreeBSD-src-1fdf0e5b3c9f3f1c562253bf991879774e6a7e9c.zip
FreeBSD-src-1fdf0e5b3c9f3f1c562253bf991879774e6a7e9c.tar.gz
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.
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 447880a..93ddf76 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); \
OpenPOWER on IntegriCloud