From 697568d1b48a497024bca234483a157cee79c7a2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 21 Jun 2000 04:35:29 +0000 Subject: Update. 2000-06-20 Jes Sorensen * sysdeps/unix/sysv/linux/ia64/syscalls.list: New file. 2000-06-20 Jes Sorensen * sysdeps/unix/sysv/linux/ia64/machine-gmon.h: New file. * sysdeps/unix/sysv/linux/ia64/profil-counter.h: New file. 2000-06-20 David Mosberger-Tang * sysdeps/unix/sysv/linux/ia64/getpagesize.c: New file. 2000-06-20 Jes Sorensen * sysdeps/unix/sysv/linux/ia64/sys/ucontext.h: Fix typo. --- linuxthreads/sysdeps/pthread/timer_delete.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'linuxthreads/sysdeps/pthread/timer_delete.c') diff --git a/linuxthreads/sysdeps/pthread/timer_delete.c b/linuxthreads/sysdeps/pthread/timer_delete.c index 4636bf707a..b7d59fe68d 100644 --- a/linuxthreads/sysdeps/pthread/timer_delete.c +++ b/linuxthreads/sysdeps/pthread/timer_delete.c @@ -36,9 +36,9 @@ timer_delete (timerid) pthread_mutex_lock (&__timer_mutex); timer = timer_id2ptr (timerid); - if (timer == NULL || !timer->inuse) + if (! timer_valid (timer)) /* Invalid timer ID or the timer is not in use. */ - errno = EINVAL; + __set_errno (EINVAL); else { if (timer->armed) @@ -50,16 +50,17 @@ timer_delete (timerid) the mutex is unlocked and timer_delete is aborted. */ pthread_cleanup_push (__timer_mutex_cancel_handler, &__timer_mutex); - /* If timer is currently being serviced, wait for it to finish. */ - while (thread->current_timer == timer) - pthread_cond_wait (&thread->cond, &__timer_mutex); + /* If timer is currently being serviced, wait for it to finish. */ + while (thread->current_timer == timer) + pthread_cond_wait (&thread->cond, &__timer_mutex); - pthread_cleanup_pop (0); + pthread_cleanup_pop (0); } /* Remove timer from whatever queue it may be on and deallocate it. */ + timer->inuse = TIMER_DELETED; list_unlink_ip (&timer->links); - __timer_dealloc (timer); + timer_delref (timer); retval = 0; } -- cgit v1.2.3-70-g09d2