mirror of
https://sourceware.org/git/glibc.git
synced 2025-12-24 17:51:17 +03:00
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.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user