|
From: <sv...@va...> - 2008-06-26 08:43:06
|
Author: bart Date: 2008-06-26 09:43:12 +0100 (Thu, 26 Jun 2008) New Revision: 8283 Log: Added configure test for the gcc/icc built-in functions for atomic memory access (__sync_bool_compare_and_swap() a.o.). Modified: trunk/configure.in Modified: trunk/configure.in =================================================================== --- trunk/configure.in 2008-06-26 08:34:53 UTC (rev 8282) +++ trunk/configure.in 2008-06-26 08:43:12 UTC (rev 8283) @@ -1109,6 +1109,23 @@ fi +# does this compiler have built-in functions for atomic memory access ? +AC_MSG_CHECKING([if gcc supports __sync_bool_compare_and_swap]) + +AC_TRY_LINK(, +[ + int variable = 1; + return __sync_bool_compare_and_swap(&variable, 1, 2) ? 1 : 0 +], +[ + AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_BUILTIN_ATOMIC, 1, [Define to 1 if gcc supports __sync_bool_compare_and_swap() a.o.]) +], +[ + AC_MSG_RESULT([no]) +]) + + # does the ppc assembler support "mtocrf" et al? AC_MSG_CHECKING([if ppc32/64 as supports mtocrf/mfocrf]) |