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:
parent
5f04ebd4d3
commit
4f2190efce
@ -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)
|
||||
{
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user