freebsd-skq/sys/cddl
Andriy Gapon 3251c5ae51 fix up r353168, add atomic_swap_64 to i386 version of opensolaris_atomic.S
The compatibility code for the atomic operations in ZFS code is a bit
messy.  In some cases the native definitions are directly made
available, in some cases there are emulated operations in
opensolaris_atomic.c and in yet other cases there are atomic operations
implemented in assembly that were obtained from OpenSolaris / illumos.

This commit adds atomic_swap_64 for use with i386 userland.
The code is copied from illumos.

I am not sure why FreeBSD does not provide that operation natively.
Maybe because we try (or pretend) to support processors that did not
have the necessary instructions.

While here I also added atomic_load_64 for the same reasons.
This is original code based on iilumos atomic_swap_64 and FreeBSD
atomic_load_acq_64_i586.

Pointyhat to:	avg
MFC after:	1 week
2019-10-07 12:53:27 +00:00
..
boot/zfs loader: support com.delphix:removing 2019-08-08 18:08:13 +00:00
compat/opensolaris ZFS: add emulation of atomic_swap_64 and atomic_load_64 2019-10-07 07:54:34 +00:00
contrib/opensolaris fix up r353168, add atomic_swap_64 to i386 version of opensolaris_atomic.S 2019-10-07 12:53:27 +00:00
dev dtrace: 64-bits registers support 2019-10-04 16:17:00 +00:00