From 1683daeb2778c6263f2680cf98551679db7e781f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 18 Apr 2004 02:37:56 +0000 Subject: Update. 2004-04-17 Jakub Jelinek * 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. --- linuxthreads/sysdeps/pthread/timer_gettime.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'linuxthreads/sysdeps/pthread/timer_gettime.c') diff --git a/linuxthreads/sysdeps/pthread/timer_gettime.c b/linuxthreads/sysdeps/pthread/timer_gettime.c index 99a080311c..723a61632f 100644 --- a/linuxthreads/sysdeps/pthread/timer_gettime.c +++ b/linuxthreads/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 . @@ -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 { -- cgit v1.2.3