about summary refs log tree commit diff
path: root/linuxthreads/sysdeps/pthread/timer_routines.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-06-20 00:34:21 +0000
committerUlrich Drepper <drepper@redhat.com>2000-06-20 00:34:21 +0000
commitd2dfc5de011fb525161b85a1408f716a2ea358cc (patch)
tree22804aa59f348ac9d5bf432d2ddeb4c79ad31910 /linuxthreads/sysdeps/pthread/timer_routines.c
parentd620426811688301eb1cbe6e63773d6430b2706e (diff)
downloadglibc-d2dfc5de011fb525161b85a1408f716a2ea358cc.tar.gz
glibc-d2dfc5de011fb525161b85a1408f716a2ea358cc.tar.xz
glibc-d2dfc5de011fb525161b85a1408f716a2ea358cc.zip
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.
Diffstat (limited to 'linuxthreads/sysdeps/pthread/timer_routines.c')
-rw-r--r--linuxthreads/sysdeps/pthread/timer_routines.c12
1 files changed, 7 insertions, 5 deletions
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);
 }