Branch: Tag:

2010-10-17

2010-10-17 10:02:25 by Artur Skawina <art.08.09@gmail.com>

Use rdtsc if available to cut syscalls in check_threads.

1: - AC_REVISION("$Id: configure.in,v 1.1093 2010/04/22 15:34:39 grubba Exp $") + AC_REVISION("$Id$")   AC_INIT(interpret.c)   AC_CONFIG_HEADER(machine.h)   
2446:    # MinGW system.    cat <<\EOF   #!/bin/sh - # Automatically generated by $Id: configure.in,v 1.1093 2010/04/22 15:34:39 grubba Exp $. + # Automatically generated by $Id$.   # MinGW-version. Do NOT edit.   posix_name="`cat`"   posix_prefix="/"
2484:    # Native POSIX system.    cat <<\EOF   #!/bin/sh - # Automatically generated by $Id: configure.in,v 1.1093 2010/04/22 15:34:39 grubba Exp $. + # Automatically generated by $Id$.   # POSIX-version. Do NOT edit.   cat   EOF
2493:    # rntcl-style    cat <<\EOF   #!/bin/sh - # Automatically generated by $Id: configure.in,v 1.1093 2010/04/22 15:34:39 grubba Exp $. + # Automatically generated by $Id$.   # RNTCL-version. Do NOT edit.   sed -e "$PIKE_PATH_TRANSLATE"   EOF
5522:   else :; fi      ######################################################################## +  + AC_MSG_CHECKING([for the RDTSC instruction (x86)]) + AC_CACHE_VAL(pike_cv_have_rdtsc, [ + AC_TRY_RUN([ +  + static long long rdtsc() + { +  unsigned long l, h; +  __asm__ __volatile__ ("rdtsc" :"=a" (l), "=d" (h)); +  return (((long long)h)<<32)|l; + } +  + int main() + { +  if (rdtsc()!=rdtsc()) +  return 0; +  return 1; + } + ],[pike_cv_have_rdtsc=yes],[pike_cv_have_rdtsc=no],[pike_cv_have_rdtsc="possibly not"])]) + AC_MSG_RESULT($pike_cv_have_rdtsc) + if test "$pike_cv_have_rdtsc" = yes; then +  AC_DEFINE(HAVE_RDTSC) + fi +  + ########################################################################   MY_CHECK_FUNCTION(fork,   [   #ifdef HAVE_SYS_TYPES_H