diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-06-09 04:59:48 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-06-09 04:59:48 +0000 |
commit | 18e4e4462d27d3ce5484f3d007681c4b19bab919 (patch) | |
tree | fc9486dda95f4d5c28f384f62bec19f92cf655cb | |
parent | 165ab1d78d209289a971f121cd3331475b340692 (diff) | |
download | glibc-18e4e4462d27d3ce5484f3d007681c4b19bab919.zip glibc-18e4e4462d27d3ce5484f3d007681c4b19bab919.tar.gz glibc-18e4e4462d27d3ce5484f3d007681c4b19bab919.tar.bz2 |
Update.
* sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer):
Be prepared for empty timer list.
-rw-r--r-- | linuxthreads/ChangeLog | 3 | ||||
-rw-r--r-- | linuxthreads/sysdeps/pthread/timer_routines.c | 7 |
2 files changed, 6 insertions, 4 deletions
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog index fcb9f9a..8e19b89 100644 --- a/linuxthreads/ChangeLog +++ b/linuxthreads/ChangeLog @@ -1,5 +1,8 @@ 2000-06-08 Ulrich Drepper <drepper@redhat.com> + * sysdeps/pthread/timer_routines.c (__timer_thread_queue_timer): + Be prepared for empty timer list. + * sysdeps/pthread/timer_create.c (timer_create): Correct names of CPUTIME clock ID. Add support for thread clocks. diff --git a/linuxthreads/sysdeps/pthread/timer_routines.c b/linuxthreads/sysdeps/pthread/timer_routines.c index becb110..8d45f05 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) |