diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-04-11 16:27:38 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-04-11 16:27:38 +0000 |
commit | e7c036b39ef12abc7ff131982df75e3ec35c0f31 (patch) | |
tree | 0f5115adbee001941fd8fdf8dac6ea2200f35d60 /sysdeps/unix/i386 | |
parent | 094f72c6a57bf36e70726c1827d93d1d85ed0154 (diff) | |
download | glibc-e7c036b39ef12abc7ff131982df75e3ec35c0f31.tar.gz glibc-e7c036b39ef12abc7ff131982df75e3ec35c0f31.tar.xz glibc-e7c036b39ef12abc7ff131982df75e3ec35c0f31.zip |
Update.
2000-04-11 Ulrich Drepper <drepper@redhat.com> * posix/globtest.sh: Fix last change. 2000-04-10 Philip Blundell <philb@gnu.org> * sysdeps/unix/sysv/linux/bits/in.h (IPV6_JOIN_GROUP, IPV6_LEAVE_GROUP): New names for IPV6_ADD_MEMBERSHIP, IPV6_DROP_MEMBERSHIP. * sysdeps/generic/bits/in.h (IPV6_JOIN_GROUP, IPV6_LEAVE_GROUP): Likewise. 2000-04-11 Ulrich Drepper <drepper@redhat.com> * elf/readlib (process_file): Close streams in case of an error. 2000-04-09 Andreas Jaeger <aj@suse.de> * elf/readlib.c (process_file): Check if file is big enough to contain aout and ELF headers. Reported by Reinhard Moosauer <RMoosauer@steinecker.com>. 2000-04-10 Jes Sorensen <Jes.Sorensen@cern.ch> * elf/dl-fini.c: Include alloca.h to get proper prototype for alloca(). 2000-04-11 Ulrich Drepper <drepper@redhat.com> * test-skeleton.c (main): If STDOUT_UNBUFFERED is defined, make stdout stream unbuffered. * rt/Makefile (tests): Add tst-clock. Add rules to build tst-clock. * rt/tst-clock.c: New file. * sysdeps/unix/i386/i586/clock_getres.c: Correct expression to decide about initialization of nsec. * sysdeps/unix/i386/i586/clock_gettime.c: Correct expression to decide about initialization of freq. Set retval to zero if successful. * sysdeps/unix/sysv/linux/i386/get_clockfreq.c: Cache result.
Diffstat (limited to 'sysdeps/unix/i386')
-rw-r--r-- | sysdeps/unix/i386/i586/clock_getres.c | 2 | ||||
-rw-r--r-- | sysdeps/unix/i386/i586/clock_gettime.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/sysdeps/unix/i386/i586/clock_getres.c b/sysdeps/unix/i386/i586/clock_getres.c index abafcc079b..dacf7f49d3 100644 --- a/sysdeps/unix/i386/i586/clock_getres.c +++ b/sysdeps/unix/i386/i586/clock_getres.c @@ -43,7 +43,7 @@ static long int nsec; #define EXTRA_CLOCK_CASES \ case __CLOCK_HIGHRES: \ { \ - if (__builtin_expect (nsec != 0, 0)) \ + if (__builtin_expect (nsec == 0, 0)) \ { \ unsigned long long int freq; \ \ diff --git a/sysdeps/unix/i386/i586/clock_gettime.c b/sysdeps/unix/i386/i586/clock_gettime.c index f623cecd09..bb63874a86 100644 --- a/sysdeps/unix/i386/i586/clock_gettime.c +++ b/sysdeps/unix/i386/i586/clock_gettime.c @@ -44,7 +44,7 @@ static unsigned long long int freq; { \ unsigned long long int tsc; \ \ - if (__builtin_expect (freq != 0, 0)) \ + if (__builtin_expect (freq == 0, 0)) \ { \ /* This can only happen if we haven't initialized the `freq' \ variable yet. Do this now. We don't have to protect this \ @@ -64,7 +64,9 @@ static unsigned long long int freq; \ /* And the nanoseconds. This computation should be stable until \ we get machines with about 16GHz frequency. */ \ - tp->tv_nsec = ((tsc % freq) * 1000000000ULL) / freq; \ + tp->tv_nsec = ((tsc % freq) * 1000000000ull) / freq; \ + \ + retval = 0; \ } \ break; |