]> sourceware.org Git - glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Fri, 16 May 2003 22:09:32 +0000 (22:09 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 16 May 2003 22:09:32 +0000 (22:09 +0000)
* pthread_join.c (pthread_join): Set tid field of the joined
thread to -1.  This isn't necessary but helps to recognize some
error conditions with almost no cost.

* allocatestack.c (FREE_P): Also negative values indicate an
unused stack.

nptl/ChangeLog
nptl/allocatestack.c
nptl/pthread_join.c

index e63c71c84110e7198698675906b7ace59edbc8a8..60b03f764d9486348c78ebf134dad2393806ac5d 100644 (file)
@@ -1,5 +1,12 @@
 2003-05-16  Ulrich Drepper  <drepper@redhat.com>
 
+       * pthread_join.c (pthread_join): Set tid field of the joined
+       thread to -1.  This isn't necessary but helps to recognize some
+       error conditions with almost no cost.
+
+       * allocatestack.c (FREE_P): Also negative values indicate an
+       unused stack.
+
        * unwind.c: Include <unistd.h>.
 
 2003-05-14  Ulrich Drepper  <drepper@redhat.com>
index 95ee992a187b578a1458726bf3d9e7d531abfddd..9653b62cab1e559c4029d5624537b9a3b5061ef1 100644 (file)
@@ -111,7 +111,7 @@ static unsigned int nptl_ncreated;
 
 
 /* Check whether the stack is still used or not.  */
-#define FREE_P(descr) ((descr)->tid == 0)
+#define FREE_P(descr) ((descr)->tid <= 0)
 
 
 /* We create a double linked list of all cache entries.  Double linked
index f77c2c9f98f0ecd59e306232d1dee020a3794baa..f94128dd9623f832f31c4db4ad8f888c20a61c47 100644 (file)
@@ -93,6 +93,9 @@ pthread_join (threadid, thread_return)
   pthread_cleanup_pop (0);
 
 
+  /* We mark the thread as terminated and as joined.  */
+  pd->tid = -1;
+
   /* Store the return value if the caller is interested.  */
   if (thread_return != NULL)
     *thread_return = pd->result;
This page took 0.076344 seconds and 5 git commands to generate.