Fix some build of LinuxKPI on some platforms after r341518.

MFC after:		1 week
Sponsored by:		Mellanox Technologies
This commit is contained in:
hselasky 2018-12-05 15:53:34 +00:00
parent eca1d53801
commit 324b106453

View File

@ -78,7 +78,15 @@ atomic_long_dec(atomic_long_t *v)
static inline long
atomic_long_xchg(atomic_long_t *v, long val)
{
#if defined(__i386__) || defined(__amd64__) || defined(__aarch64__)
return atomic_swap_long(&v->counter, val);
#else
long ret = atomic_long_read(v);
while (!atomic_fcmpset_long(&v->counter, &ret, val))
;
return (ret);
#endif
}
static inline long