From 8e2b83e73332e6d28af06a51a457e2d6b323620b Mon Sep 17 00:00:00 2001 From: Mikael Ronstrom Date: Wed, 10 Dec 2008 14:02:52 +0100 Subject: Added a PAUSE instruction to the SPIN loop according to recommendation from Intel. --- configure.in | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'configure.in') diff --git a/configure.in b/configure.in index d7f250959d1..be6a4a33c65 100644 --- a/configure.in +++ b/configure.in @@ -2342,6 +2342,17 @@ fi fi #---END: +#Check for x86 PAUSE instruction +AC_MSG_CHECKING("for x86 PAUSE instruction") +AC_TRY_COMPILE( +[], +[{__asm__ __volatile__ ("pause");}], +x86_pause_exists=yes, x86_pause_exists=no) +if test "$x86_pause_exists" = "yes" +then + AC_DEFINE([HAVE_PAUSE_INSTRUCTION], [1], [Does x86 PAUSE instruction exist]) +fi + # Check if pthread_attr_setscope() exists AC_CACHE_CHECK("for pthread_attr_setscope", mysql_cv_pthread_attr_setscope, AC_TRY_LINK( -- cgit v1.2.1