From df1680c83ab28b632d1a8cb6c2fc107113379671 Mon Sep 17 00:00:00 2001 From: rth Date: Thu, 26 Jan 2012 21:48:27 +0000 Subject: Define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL * target.def (TARGET_ATOMIC_TEST_AND_SET_TRUEVAL): New. * c-cppbuiltin.c (cpp_atomic_builtins): Define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL. * doc/tm.texi.in (TARGET_ATOMIC_TEST_AND_SET_TRUEVAL): Add doc hook. * doc/tm.texi: Rebuild. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183581 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/c-family/c-cppbuiltin.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gcc/c-family/c-cppbuiltin.c') diff --git a/gcc/c-family/c-cppbuiltin.c b/gcc/c-family/c-cppbuiltin.c index 7e7b9c15876..608dba6ecd4 100644 --- a/gcc/c-family/c-cppbuiltin.c +++ b/gcc/c-family/c-cppbuiltin.c @@ -670,6 +670,11 @@ cpp_atomic_builtins (cpp_reader *pfile) builtin_define_with_int_value ("__GCC_ATOMIC_LLONG_LOCK_FREE", (have_swap[SWAP_INDEX (long_long_integer_type_node)]? 2 : 1)); + /* If we're dealing with a "set" value that doesn't exactly correspond + to a boolean truth value, let the library work around that. */ + builtin_define_with_int_value ("__GCC_ATOMIC_TEST_AND_SET_TRUEVAL", + targetm.atomic_test_and_set_trueval); + /* ptr_type_node can't be used here since ptr_mode is only set when toplev calls backend_init which is not done with -E or pch. */ psize = POINTER_SIZE / BITS_PER_UNIT; -- cgit v1.2.1