From 18e4e4462d27d3ce5484f3d007681c4b19bab919 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 9 Jun 2000 04:59:48 +0000 Subject: Update. * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer): Be prepared for empty timer list. --- linuxthreads/sysdeps/pthread/timer_routines.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'linuxthreads/sysdeps/pthread/timer_routines.c') diff --git a/linuxthreads/sysdeps/pthread/timer_routines.c b/linuxthreads/sysdeps/pthread/timer_routines.c index becb110010..8d45f05207 100644 --- a/linuxthreads/sysdeps/pthread/timer_routines.c +++ b/linuxthreads/sysdeps/pthread/timer_routines.c @@ -374,8 +374,8 @@ thread_func (void *arg) list_unlink (first); - if (timer->value.it_interval.tv_sec - || timer->value.it_interval.tv_nsec) + if (__builtin_expect (timer->value.it_interval.tv_sec, 0) != 0 + || timer->value.it_interval.tv_nsec != 0) { timespec_add (&timer->expirytime, &now, &timer->value.it_interval); @@ -433,7 +433,7 @@ __timer_thread_queue_timer (struct thread_node *thread, } } - if (insert->clock != timer->clock) + if (timer != NULL && insert->clock != timer->clock) { if (matching == NULL) /* We cannot queue this timer. */ @@ -456,7 +456,6 @@ __timer_thread_start (struct thread_node *thread) int retval = 1; assert (!thread->exists); - thread->exists = 1; if (pthread_create (&thread->id, &thread->attr, thread_func, thread) != 0) -- cgit v1.2.3-70-g09d2