Only define atomic_fcmpset_long in the kernel. We may include

machine/atomic.h in userspace, however atomic_fcmpset_32 is unimplemented
there.

Sponsored by:	ABT Systems Ltd
This commit is contained in:
andrew 2017-02-03 10:04:17 +00:00
parent 3244799601
commit 9e5838043e

View File

@ -463,6 +463,8 @@ atomic_cmpset_long(volatile u_long *dst, u_long old, u_long newe)
return (atomic_cmpset_32((volatile uint32_t *)dst, old, newe));
}
#ifdef _KERNEL
/* atomic_fcmpset_32 is only defined for the kernel */
static __inline u_long
atomic_fcmpset_long(volatile u_long *dst, u_long *old, u_long newe)
{
@ -470,6 +472,7 @@ atomic_fcmpset_long(volatile u_long *dst, u_long *old, u_long newe)
return (atomic_fcmpset_32((volatile uint32_t *)dst,
(uint32_t *)old, newe));
}
#endif
static __inline u_long
atomic_fetchadd_long(volatile u_long *p, u_long v)