From d2dfc5de011fb525161b85a1408f716a2ea358cc Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 20 Jun 2000 00:34:21 +0000 Subject: Update. * iconv/gconv_int.h (strict gconv_module): Remove all members associated with regular expressions. Use a simple string as the from name. * iconv/gconv_db.c: Remove code handling regular expressions. * iconv/gconv_conf.c: Likewise. * iconv/iconv_prog.c: Likewise. * iconv/gconv_builtin.h: Adjust for change in gconv_conf.c. --- linuxthreads/sysdeps/pthread/timer_routines.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 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 ddf02fadd6..2d4e325b6d 100644 --- a/linuxthreads/sysdeps/pthread/timer_routines.c +++ b/linuxthreads/sysdeps/pthread/timer_routines.c @@ -181,7 +181,7 @@ init_module (void) for (i = 0; i < TIMER_MAX; ++i) { list_append (&timer_free_list, &__timer_array[i].links); - __timer_array[i].inuse = 0; + __timer_array[i].inuse = TIMER_FREE; } for (i = 0; i < THREAD_MAXNODES; ++i) @@ -309,7 +309,7 @@ thread_cleanup (void *val) static void thread_expire_timer (struct thread_node *self, struct timer_node *timer) { - self->current_timer = timer; + self->current_timer = timer; /* Lets timer_delete know timer is running. */ pthread_mutex_unlock (&__timer_mutex); @@ -443,7 +443,7 @@ thread_func (void *arg) } -/* Enqueue a timer in wakeup order in the thread's timer queue. +/* Enqueue a timer in wakeup order in the thread's timer queue. Returns 1 if the timer was inserted at the head of the queue, causing the queue's next wakeup time to change. */ @@ -551,7 +551,8 @@ __timer_alloc (void) { struct timer_node *timer = timer_links2ptr (node); list_unlink_ip (node); - timer->inuse = 1; + timer->inuse = TIMER_INUSE; + timer->refcount = 1; return timer; } @@ -564,8 +565,9 @@ __timer_alloc (void) void __timer_dealloc (struct timer_node *timer) { + assert (timer->refcount == 0); timer->thread = NULL; /* Break association between timer and thread. */ - timer->inuse = 0; + timer->inuse = TIMER_FREE; list_append (&timer_free_list, &timer->links); } -- cgit v1.2.3