Fix 32-bit buildworld for i386 after r334320.

The 64-bit atomics defined for i386 are currently only available in
the kernel space.

Found by:	cy@
MFC after:	1 week
Sponsored by:	Mellanox Technologies
This commit is contained in:
Hans Petter Selasky 2018-05-29 13:43:16 +00:00
parent 5f04ebd4d3
commit 4f2190efce
2 changed files with 7 additions and 3 deletions

View File

@ -53,7 +53,7 @@ atomic_init(void)
#endif
#if !defined(__LP64__) && !defined(__mips_n32) && \
!defined(ARM_HAVE_ATOMIC64) && !defined(__i386__)
!defined(ARM_HAVE_ATOMIC64) && !defined(I386_HAVE_ATOMIC64)
void
atomic_add_64(volatile uint64_t *target, int64_t delta)
{

View File

@ -36,8 +36,12 @@
atomic_cmpset_ptr((volatile uintptr_t *)(_a), (uintptr_t)(_b), (uintptr_t) (_c))
#define cas32 atomic_cmpset_32
#if defined(__i386__) && (defined(_KERNEL) || defined(KLD_MODULE))
#define I386_HAVE_ATOMIC64
#endif
#if !defined(__LP64__) && !defined(__mips_n32) && \
!defined(ARM_HAVE_ATOMIC64) && !defined(__i386__)
!defined(ARM_HAVE_ATOMIC64) && !defined(I386_HAVE_ATOMIC64)
extern void atomic_add_64(volatile uint64_t *target, int64_t delta);
extern void atomic_dec_64(volatile uint64_t *target);
#endif
@ -87,7 +91,7 @@ atomic_dec_32_nv(volatile uint32_t *target)
}
#if defined(__LP64__) || defined(__mips_n32) || \
defined(ARM_HAVE_ATOMIC64) || defined(__i386__)
defined(ARM_HAVE_ATOMIC64) || defined(I386_HAVE_ATOMIC64)
static __inline void
atomic_dec_64(volatile uint64_t *target)
{