aboutsummaryrefslogtreecommitdiff
path: root/linuxthreads/manager.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-04-21 07:55:01 +0000
committerUlrich Drepper <drepper@redhat.com>2001-04-21 07:55:01 +0000
commit5fc48cd78f0c50e889d1c1f3b8f812058db71ecd (patch)
tree97c81fc8d9405b4f9228f2a76282017e887d8b13 /linuxthreads/manager.c
parentb17c0a8e31fe9e99359b6a874008de7aba85d64e (diff)
downloadglibc-5fc48cd78f0c50e889d1c1f3b8f812058db71ecd.tar
glibc-5fc48cd78f0c50e889d1c1f3b8f812058db71ecd.tar.gz
glibc-5fc48cd78f0c50e889d1c1f3b8f812058db71ecd.tar.bz2
glibc-5fc48cd78f0c50e889d1c1f3b8f812058db71ecd.zip
Update.
2001-04-21 Ulrich Drepper <drepper@redhat.com> * 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.
Diffstat (limited to 'linuxthreads/manager.c')
-rw-r--r--linuxthreads/manager.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/linuxthreads/manager.c b/linuxthreads/manager.c
index 431e149212..dbe2aa2d19 100644
--- a/linuxthreads/manager.c
+++ b/linuxthreads/manager.c
@@ -225,10 +225,17 @@ static int pthread_start_thread(void *arg)
pthread_descr self = (pthread_descr) arg;
struct pthread_request request;
void * outcome;
+#ifdef CPUCLOCK_VARDEF
+ CPUCLOCK_VARDEF (tmpclock);
+#endif
/* Initialize special thread_self processing, if any. */
#ifdef INIT_THREAD_SELF
INIT_THREAD_SELF(self, self->p_nr);
#endif
+#ifdef CPUCLOCK_INIT
+ CPUCLOCK_INIT (tmpclock);
+ THREAD_SETMEM (self, p_cpuclock_offset, tmpclock);
+#endif
/* Make sure our pid field is initialized, just in case we get there
before our father has initialized it. */
THREAD_SETMEM(self, p_pid, __getpid());