]> granicus.if.org Git - libatomic_ops/commit
Implement CAS_acquire/release/full using __atomic_compare_exchange_n (gcc)
authorIvan Maidanski <ivmai@mail.ru>
Fri, 8 Apr 2016 08:29:08 +0000 (11:29 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 8 Apr 2016 08:29:08 +0000 (11:29 +0300)
commit73d83212c4ed9cd4e91a9ac8e649f30239077292
treec0538cbdb84c2b122031af790c20aea874c51386
parent83fca6816765592cca864a81060cb0f58d3e401c
Implement CAS_acquire/release/full using __atomic_compare_exchange_n (gcc)

* src/atomic_ops/sysdeps/gcc/generic-small.h: Regenerate.
* src/atomic_ops/sysdeps/gcc/generic-small.template
(AO_XSIZE_fetch_compare_and_swap, AO_XSIZE_compare_and_swap): Use
__atomic_compare_exchange_n(RELAXED) instead of
__sync_val/bool_compare_and_swap.
* src/atomic_ops/sysdeps/gcc/generic.h (AO_double_compare_and_swap):
Likewise.
* src/atomic_ops/sysdeps/gcc/generic-small.template
[AO_GCC_HAVE_XSIZE_SYNC_CAS] (AO_XSIZE_fetch_compare_and_swap_acquire,
AO_XSIZE_fetch_compare_and_swap_release,
AO_XSIZE_fetch_compare_and_swap_full): New inline function; remove
TODO item.
* src/atomic_ops/sysdeps/gcc/generic-small.template
[AO_GCC_HAVE_XSIZE_SYNC_CAS && !AO_GENERALIZE_ASM_BOOL_CAS]
(AO_XSIZE_compare_and_swap_acquire, AO_XSIZE_compare_and_swap_release,
AO_XSIZE_compare_and_swap_full): Likewise.
* src/atomic_ops/sysdeps/gcc/generic.h [AO_GCC_HAVE_double_SYNC_CAS]
(AO_double_compare_and_swap_acquire,
AO_double_compare_and_swap_release, AO_double_compare_and_swap_full):
Likewise.
* src/atomic_ops/sysdeps/gcc/generic.h (AO_compare_and_swap_acquire):
Reformat code.
src/atomic_ops/sysdeps/gcc/generic-small.h
src/atomic_ops/sysdeps/gcc/generic-small.template
src/atomic_ops/sysdeps/gcc/generic.h