From 5fc48cd78f0c50e889d1c1f3b8f812058db71ecd Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 21 Apr 2001 07:55:01 +0000 Subject: Update. 2001-04-21 Ulrich Drepper * elf/dl-support.c: Include cpuclock-init.h. Use CPUCLOCK_VARDEF and CPUCLOCK_INIT if defined. * sysdeps/generic/dl-sysdep.c: Likewise. * sysdeps/generic/cpuclock-init.h: New file. * sysdeps/unix/i386/i586/cpuclock-init.h: New file. * sysdeps/unix/i386/i586/Versions: New file. * sysdeps/unix/i386/i586/clock_settime.c: New file. * sysdeps/unix/i386/i586/clock_gettime.c: Handle thread CPU clock separately by calling __pthread_clock_gettime if this function is available. Subtract offset from tsc value before computing time value. --- linuxthreads/pthread.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'linuxthreads/pthread.c') diff --git a/linuxthreads/pthread.c b/linuxthreads/pthread.c index ff9c083..73a7acb 100644 --- a/linuxthreads/pthread.c +++ b/linuxthreads/pthread.c @@ -225,6 +225,11 @@ static void pthread_handle_sigcancel(int sig); static void pthread_handle_sigrestart(int sig); static void pthread_handle_sigdebug(int sig); +/* CPU clock handling. */ +#ifdef CPUCLOCK_VARDECL +CPUCLOCK_VARDECL (_dl_cpuclock_offset); +#endif + /* Signal numbers used for the communication. In these variables we keep track of the used variables. If the platform does not support any real-time signals we will define the @@ -390,6 +395,9 @@ __pthread_initialize_minimal(void) #ifdef INIT_THREAD_SELF INIT_THREAD_SELF(&__pthread_initial_thread, 0); #endif +#ifdef CPUCLOCK_INIT + __pthread_initial_thread.p_cpuclock_offset = _dl_cpuclock_offset; +#endif } -- cgit v1.1