aboutsummaryrefslogtreecommitdiff
path: root/cddl
diff options
context:
space:
mode:
authorAndriy Gapon <avg@FreeBSD.org>2019-10-09 11:26:36 +0000
committerAndriy Gapon <avg@FreeBSD.org>2019-10-09 11:26:36 +0000
commitf5c4c7209be61707dd84b50f1852d994d0df661a (patch)
treeb398e0185a4030d58099fddd840c4deb820f63cd /cddl
parent3af7f97c4e196d987da10541088b539f283e91c0 (diff)
downloadsrc-f5c4c7209be61707dd84b50f1852d994d0df661a.tar.gz
src-f5c4c7209be61707dd84b50f1852d994d0df661a.zip
cleanup of illumos compatibility atomics
atomic_cas_32 is implemented using atomic_fcmpset_32 on all platforms. Ditto for atomic_cas_64 and atomic_fcmpset_64 on platforms that have it. The only exception is sparc64 that provides MD atomic_cas_32 and atomic_cas_64. This is slightly inefficient as fcmpset reports whether the operation updated the target and that information is not needed for cas. Nevertheless, there is less code to maintain and to add for new platforms. Also, the operations are done inline now as opposed to function calls before. atomic_add_64_nv is implemented using atomic_fetchadd_64 on platforms that provide it. casptr, cas32, atomic_or_8, atomic_or_8_nv are completely removed as they have no users. atomic_mtx that is used to emulate 64-bit atomics on platforms that lack them is defined only on those platforms. As a result, platform specific opensolaris_atomic.S files have lost most of their code. The only exception is i386 where the compat+contrib code provides 64-bit atomics for userland use. That code assumes availability of cmpxchg8b instruction. FreeBSD does not have that assumption for i386 userland and does not provide 64-bit atomics. Hopefully, this can and will be fixed. MFC after: 3 weeks
Notes
Notes: svn path=/head/; revision=353340
Diffstat (limited to 'cddl')
0 files changed, 0 insertions, 0 deletions