]>
granicus.if.org Git - libatomic_ops/commit
Use __builtin_expect in CAS failure loop condition checks (GCC only)
* src/atomic_ops.c (lock, block_all_signals): Use AO_EXPECT_FALSE.
* src/atomic_ops.h (AO_EXPECT_FALSE): New macro.
* src/atomic_ops/generalize-small.template
(AO_XSIZE_fetch_and_add_full, AO_XSIZE_fetch_and_add_acquire,
AO_XSIZE_fetch_and_add_release): Use AO_EXPECT_FALSE for CAS failure
check.
* src/atomic_ops/generalize.h (AO_fetch_and_add_full,
AO_fetch_and_add_acquire, AO_fetch_and_add_release, AO_fetch_and_add,
AO_and_full, AO_or_full, AO_xor_full): Likewise.
* src/atomic_ops/sysdeps/gcc/arm.h
(AO_compare_double_and_swap_double): Likewise.
* src/atomic_ops_stack.c (AO_stack_push_explicit_aux_release,
AO_stack_pop_explicit_aux_acquire, AO_stack_push_release,
AO_stack_pop_acquire): Likewise.
* src/atomic_ops/generalize-small.h: Regenerate.