1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-14 14:55:41 +00:00

Fix some build of LinuxKPI on some platforms after r341518.

MFC after:		1 week
Sponsored by:		Mellanox Technologies
This commit is contained in:
Hans Petter Selasky 2018-12-05 15:53:34 +00:00
parent 8a886978d4
commit 6da0d28e6a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=341591

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