summaryrefslogtreecommitdiffstats
path: root/sys/arm/include/atomic.h
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2014-08-02 03:44:27 +0000
committerian <ian@FreeBSD.org>2014-08-02 03:44:27 +0000
commite5aca7d143549683ac45e9f96ff7c2a12bd2a284 (patch)
tree59d10c60d513161e5982dd553bc389e2a4a66db8 /sys/arm/include/atomic.h
parentc4de04677ad6bd005035f037f70bf1ff8579a1c1 (diff)
downloadFreeBSD-src-e5aca7d143549683ac45e9f96ff7c2a12bd2a284.zip
FreeBSD-src-e5aca7d143549683ac45e9f96ff7c2a12bd2a284.tar.gz
When arm 64-bit atomic ops are available, define ARM_HAVE_ATOMIC64. Use
that symbol (which will be correct in both kernel and userland contexts) rather than just __arm__ to decide whether to use a local implementation.
Diffstat (limited to 'sys/arm/include/atomic.h')
-rw-r--r--sys/arm/include/atomic.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/arm/include/atomic.h b/sys/arm/include/atomic.h
index c6b0008..a62ca00 100644
--- a/sys/arm/include/atomic.h
+++ b/sys/arm/include/atomic.h
@@ -88,6 +88,8 @@
defined (__ARM_ARCH_6T2__) || \
defined (__ARM_ARCH_6Z__) || \
defined (__ARM_ARCH_6ZK__)
+#define ARM_HAVE_ATOMIC64
+
static __inline void
__do_dmb(void)
{
@@ -722,6 +724,8 @@ __swp(uint32_t val, volatile uint32_t *ptr)
#ifdef _KERNEL
+#define ARM_HAVE_ATOMIC64
+
static __inline void
atomic_set_32(volatile uint32_t *address, uint32_t setmask)
{
OpenPOWER on IntegriCloud