diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-10-05 09:26:23 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-10-05 09:26:23 +0000 |
commit | 6ab5f50de41c22de3752722108def4ae721aec13 (patch) | |
tree | 8216df42a3ec79a3a80501cdf224b61d9f6aa383 /sysdeps/unix/sysv/linux | |
parent | e14bbf537e28b5470e5491bf0c1dc3d8849bc283 (diff) | |
download | glibc-6ab5f50de41c22de3752722108def4ae721aec13.tar.gz glibc-6ab5f50de41c22de3752722108def4ae721aec13.tar.xz glibc-6ab5f50de41c22de3752722108def4ae721aec13.zip |
Update.
2004-10-05 Jakub Jelinek <jakub@redhat.com> * sysdeps/unix/sysv/linux/x86_64/sysconf.c (__sysconf): Return 200112L for _SC_CPUTIME or _SC_THREAD_CPUTIME. * nscd/Makefile (nscd-cflags): Set to -DIS_IN_nscd=1, plus -fpie if building PIE. (CFLAGS-*.c): Use it. * nscd/Makefile (relro-LDFLAGS): Add -Wl,-z,now if have-z-relro. ($(objpfx)nscd): Add $(relro-LDFLAGS). * sysdeps/unix/sysv/linux/i386/sysconf.c: Include hp-timing.h. (__sysconf): Return -1 for _SC_CPUTIME or _SC_THREAD_CPUTIME if !HP_TIMING_AVAIL. 2004-10-05 Ulrich Drepper <drepper@redhat.com> * nscd/Makefile (distribute): Remove TODO. * nscd/TODO: Removed.
Diffstat (limited to 'sysdeps/unix/sysv/linux')
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/sysconf.c | 14 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/x86_64/sysconf.c | 6 |
2 files changed, 13 insertions, 7 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/sysconf.c b/sysdeps/unix/sysv/linux/i386/sysconf.c index 8a9ab61912..eae849b277 100644 --- a/sysdeps/unix/sysv/linux/i386/sysconf.c +++ b/sysdeps/unix/sysv/linux/i386/sysconf.c @@ -21,7 +21,7 @@ #include <stdbool.h> #include <stdlib.h> #include <unistd.h> - +#include <hp-timing.h> static long int linux_sysconf (int name); @@ -347,13 +347,13 @@ __sysconf (int name) { if (name == _SC_CPUTIME || name == _SC_THREAD_CPUTIME) { - /* Check dynamically. */ - int ac = i386_i486_test (); - - /* Only i386 and i486 have no TSC. */ +#if HP_TIMING_AVAIL // XXX We can add here test for machines which cannot support a - // XXX usabel TSC. - return ac == 0 || (ac & (1 << 21)) == 0 ? -1 : 200112L; + // XXX usable TSC. + return 200112L; +#else + return -1; +#endif } /* All the remainder, except the cache information, is handled in diff --git a/sysdeps/unix/sysv/linux/x86_64/sysconf.c b/sysdeps/unix/sysv/linux/x86_64/sysconf.c index 87f2c451f3..407fd46bc3 100644 --- a/sysdeps/unix/sysv/linux/x86_64/sysconf.c +++ b/sysdeps/unix/sysv/linux/x86_64/sysconf.c @@ -279,6 +279,12 @@ handle_amd (int name) long int __sysconf (int name) { + if (name == _SC_CPUTIME || name == _SC_THREAD_CPUTIME) + { + /* XXX Test whether TSC is usable. */ + return 200112L; + } + /* We only handle the cache information here (for now). */ if (name < _SC_LEVEL1_ICACHE_SIZE || name > _SC_LEVEL4_CACHE_LINESIZE) return linux_sysconf (name); |