Branch: Tag:

2007-06-10

2007-06-10 18:11:13 by Martin Stjernholm <mast@lysator.liu.se>

Added support for POSIX style timers using clock_gettime(3). Notably this
fixes nice high resolution thread local cpu time and monotonic real time on
reasonably modern Linux systems.

Also added a few more pike constants about various characteristics of the
cpu/real time interfaces in use.

Rev: src/acconfig.h:1.155
Rev: src/builtin_functions.c:1.640
Rev: src/configure.in:1.1019
Rev: src/gc.c:1.290
Rev: src/gc.h:1.129
Rev: src/modules/system/system.c:1.182
Rev: src/pike_rusage.h:1.18
Rev: src/rusage.c:1.46
Rev: src/threads.c:1.254
Rev: src/threads.h:1.132

1: - AC_REVISION("$Id: configure.in,v 1.1018 2007/06/10 12:26:02 mast Exp $") + AC_REVISION("$Id: configure.in,v 1.1019 2007/06/10 18:11:12 mast Exp $")   AC_INIT(interpret.c)   AC_CONFIG_HEADER(machine.h)   
2308:    # MinGW system.    cat <<\EOF   #!/bin/sh - # Automatically generated by $Id: configure.in,v 1.1018 2007/06/10 12:26:02 mast Exp $. + # Automatically generated by $Id: configure.in,v 1.1019 2007/06/10 18:11:12 mast Exp $.   # MinGW-version. Do NOT edit.   posix_name="`cat`"   posix_prefix="/"
2346:    # Native POSIX system.    cat <<\EOF   #!/bin/sh - # Automatically generated by $Id: configure.in,v 1.1018 2007/06/10 12:26:02 mast Exp $. + # Automatically generated by $Id: configure.in,v 1.1019 2007/06/10 18:11:12 mast Exp $.   # POSIX-version. Do NOT edit.   cat   EOF
2355:    # rntcl-style    cat <<\EOF   #!/bin/sh - # Automatically generated by $Id: configure.in,v 1.1018 2007/06/10 12:26:02 mast Exp $. + # Automatically generated by $Id: configure.in,v 1.1019 2007/06/10 18:11:12 mast Exp $.   # RNTCL-version. Do NOT edit.   sed -e "$PIKE_PATH_TRANSLATE"   EOF
4325:    sysconf \    getpagesize \    GetSystemInfo \ +  clock_getcpuclockid \   )      # SunOS 4 realloc() returns NULL when reallocing NULL.
7198:      #######################################################################    - AC_MSG_CHECKING(if cpu time is thread local) + AC_MSG_CHECKING(if fallback cpu time is thread local)   AC_CACHE_VAL(pike_cv_thread_local_cpu_time, [    rm -f confdefs.out.2 2>/dev/null    AC_TRY_RUN([
7210:   #ifdef PIKE_THREADS      #define CONFIGURE_TEST + #define CONFIGURE_TEST_FALLBACK_GET_CPU_TIME   /* Don't need stralloc.h in this mode, but it often gets indirectly included. */   #define STRALLOC_H   
7326:   test x"$pike_cv_thread_local_cpu_time" != x && result="$pike_cv_thread_local_cpu_time"   AC_MSG_RESULT($result)   if test "$pike_cv_thread_local_cpu_time" = yes; then -  AC_DEFINE(CPU_TIME_IS_THREAD_LOCAL, PIKE_YES) +  AC_DEFINE(FB_CPU_TIME_IS_THREAD_LOCAL, PIKE_YES)   elif test "$pike_cv_thread_local_cpu_time" = no; then -  AC_DEFINE(CPU_TIME_IS_THREAD_LOCAL, PIKE_NO) +  AC_DEFINE(FB_CPU_TIME_IS_THREAD_LOCAL, PIKE_NO)   else -  AC_DEFINE(CPU_TIME_IS_THREAD_LOCAL, PIKE_UNKNOWN) +  AC_DEFINE(FB_CPU_TIME_IS_THREAD_LOCAL, PIKE_UNKNOWN)   fi      #######################################################################