]> granicus.if.org Git - libatomic_ops/commit
Define AO_TS_SET to true (1) if GCC atomic_test_and_set is used
authorIvan Maidanski <ivmai@mail.ru>
Tue, 28 Nov 2017 19:11:15 +0000 (22:11 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 28 Nov 2017 19:11:15 +0000 (22:11 +0300)
commit5a5a641adf1451fad8a02e14e16aad7add97e830
tree663ce97b6676956eb1bdbb451d87dc52ac30e460
parent1b0e5029140cadf64fc0e5608ea40b3d928faaaa
Define AO_TS_SET to true (1) if GCC atomic_test_and_set is used
(fix commit 3315a03)

According to GCC manual about the built-in functions for memory model
aware atomic operations, __atomic_test_and_set returns bool value;
bool true is encoded as 1.

* src/atomic_ops/sysdeps/test_and_set_t_is_char.h [AO_PREFER_GENERALIZED
|| !__GCC_ATOMIC_TEST_AND_SET_TRUEVAL] (AO_TS_SET_TRUEVAL): Define to 1
(instead of 0xff).
src/atomic_ops/sysdeps/test_and_set_t_is_char.h