diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-06-21 04:35:29 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-06-21 04:35:29 +0000 |
commit | 697568d1b48a497024bca234483a157cee79c7a2 (patch) | |
tree | 890f34b715a2a1fdbeaa1307e676e49ea15d3632 /linuxthreads/sysdeps/pthread/timer_delete.c | |
parent | 1b97149de806a27fe8f52cd5841c252df168a5b8 (diff) | |
download | glibc-697568d1b48a497024bca234483a157cee79c7a2.tar.gz |
Update.
2000-06-20 Jes Sorensen <jes@linuxcare.com>
* sysdeps/unix/sysv/linux/ia64/syscalls.list: New file.
2000-06-20 Jes Sorensen <jes@linuxcare.com>
* 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 <davidm@hpl.hp.com>
* sysdeps/unix/sysv/linux/ia64/getpagesize.c: New file.
2000-06-20 Jes Sorensen <jes@linuxcare.com>
* sysdeps/unix/sysv/linux/ia64/sys/ucontext.h: Fix typo.
Diffstat (limited to 'linuxthreads/sysdeps/pthread/timer_delete.c')
-rw-r--r-- | linuxthreads/sysdeps/pthread/timer_delete.c | 15 |
1 files changed, 8 insertions, 7 deletions
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; } |