diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-04-18 02:37:56 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-04-18 02:37:56 +0000 |
commit | 1683daeb2778c6263f2680cf98551679db7e781f (patch) | |
tree | 52427f4c33485d2fefc0a2e2c89c1cc3cdcecb5c /nptl/sysdeps/pthread/timer_gettime.c | |
parent | f532641db76c471c9e61a8847a820066177ec818 (diff) | |
download | glibc-1683daeb2778c6263f2680cf98551679db7e781f.tar.gz glibc-1683daeb2778c6263f2680cf98551679db7e781f.tar.xz glibc-1683daeb2778c6263f2680cf98551679db7e781f.zip |
Update.
2004-04-17 Jakub Jelinek <jakub@redhat.com> * rt/Makefile (tests): Add tst-mqueue8. * rt/tst-mqueue8.c: New test. * sysdeps/unix/sysv/linux/s390/Makefile (librt-routines): Add rt-sysdep. * sysdeps/unix/sysv/linux/s390/rt-sysdep.S: New file.
Diffstat (limited to 'nptl/sysdeps/pthread/timer_gettime.c')
-rw-r--r-- | nptl/sysdeps/pthread/timer_gettime.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/nptl/sysdeps/pthread/timer_gettime.c b/nptl/sysdeps/pthread/timer_gettime.c index 99a080311c..723a61632f 100644 --- a/nptl/sysdeps/pthread/timer_gettime.c +++ b/nptl/sysdeps/pthread/timer_gettime.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 Free Software Foundation, Inc. +/* Copyright (C) 2000, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Kaz Kylheku <kaz@ashi.footprints.net>. @@ -54,7 +54,13 @@ timer_gettime (timerid, value) if (armed) { clock_gettime (clock, &now); - timespec_sub (&value->it_value, &expiry, &now); + if (timespec_compare (&now, &expiry) < 0) + timespec_sub (&value->it_value, &expiry, &now); + else + { + value->it_value.tv_sec = 0; + value->it_value.tv_nsec = 0; + } } else { |