diff options
author | ian <ian@FreeBSD.org> | 2014-08-11 02:20:24 +0000 |
---|---|---|
committer | ian <ian@FreeBSD.org> | 2014-08-11 02:20:24 +0000 |
commit | 6b999dff3e159c3cb1559a30c663435c3265807b (patch) | |
tree | d732f48bb7ec4608a3f5ca242d03181e7f091bde /sys/cddl/compat | |
parent | 8067096dad03c7d9e39793e2c65fd2b67a2b1727 (diff) | |
download | FreeBSD-src-6b999dff3e159c3cb1559a30c663435c3265807b.zip FreeBSD-src-6b999dff3e159c3cb1559a30c663435c3265807b.tar.gz |
MFC r269403, r269405, r269410, r269414:
Add 64-bit atomic ops for armv6, and also for armv4 only in kernel code.
Use the new ops in the cddl code (and avoid defining functions with the
same names locally).
Diffstat (limited to 'sys/cddl/compat')
-rw-r--r-- | sys/cddl/compat/opensolaris/kern/opensolaris_atomic.c | 2 | ||||
-rw-r--r-- | sys/cddl/compat/opensolaris/sys/atomic.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sys/cddl/compat/opensolaris/kern/opensolaris_atomic.c b/sys/cddl/compat/opensolaris/kern/opensolaris_atomic.c index 4aba9ea..8a0fdf3 100644 --- a/sys/cddl/compat/opensolaris/kern/opensolaris_atomic.c +++ b/sys/cddl/compat/opensolaris/kern/opensolaris_atomic.c @@ -52,7 +52,7 @@ atomic_init(void) } #endif -#if !defined(__LP64__) && !defined(__mips_n32) +#if !defined(__LP64__) && !defined(__mips_n32) && !defined(ARM_HAVE_ATOMIC64) void atomic_add_64(volatile uint64_t *target, int64_t delta) { diff --git a/sys/cddl/compat/opensolaris/sys/atomic.h b/sys/cddl/compat/opensolaris/sys/atomic.h index f34d77e..65c9e71 100644 --- a/sys/cddl/compat/opensolaris/sys/atomic.h +++ b/sys/cddl/compat/opensolaris/sys/atomic.h @@ -36,7 +36,7 @@ atomic_cmpset_ptr((volatile uintptr_t *)(_a), (uintptr_t)(_b), (uintptr_t) (_c)) #define cas32 atomic_cmpset_32 -#if !defined(__LP64__) && !defined(__mips_n32) +#if !defined(__LP64__) && !defined(__mips_n32) && !defined(ARM_HAVE_ATOMIC64) extern void atomic_add_64(volatile uint64_t *target, int64_t delta); extern void atomic_dec_64(volatile uint64_t *target); #endif @@ -85,7 +85,7 @@ atomic_dec_32_nv(volatile uint32_t *target) return (atomic_fetchadd_32(target, -1) - 1); } -#if defined(__LP64__) || defined(__mips_n32) +#if defined(__LP64__) || defined(__mips_n32) || defined(ARM_HAVE_ATOMIC64) static __inline void atomic_dec_64(volatile uint64_t *target) { |