(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).
* all zeroes, and the "set" value contains all ones typically.
*/
-#if defined(AO_GCC_ATOMIC_TEST_AND_SET) && !defined(AO_PREFER_GENERALIZED) \
- && defined(__GCC_ATOMIC_TEST_AND_SET_TRUEVAL)
+#ifndef AO_GCC_ATOMIC_TEST_AND_SET
+# define AO_TS_SET_TRUEVAL 0xff
+#elif defined(__GCC_ATOMIC_TEST_AND_SET_TRUEVAL) \
+ && !defined(AO_PREFER_GENERALIZED)
# define AO_TS_SET_TRUEVAL __GCC_ATOMIC_TEST_AND_SET_TRUEVAL
#else
-# define AO_TS_SET_TRUEVAL 0xff
+# define AO_TS_SET_TRUEVAL 1 /* true */
#endif
typedef enum {