aboutsummaryrefslogtreecommitdiff
path: root/nptl/pthread_join.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-05-16 22:09:32 +0000
committerUlrich Drepper <drepper@redhat.com>2003-05-16 22:09:32 +0000
commit7ac5b8e2fae145766821d141cf892bbfa50d6618 (patch)
treeb72d74efac9467f44f10503be7abd9531bb4f370 /nptl/pthread_join.c
parentbc58c14e334a40141d84b7951c5875cef96b1a2b (diff)
downloadglibc-7ac5b8e2fae145766821d141cf892bbfa50d6618.tar
glibc-7ac5b8e2fae145766821d141cf892bbfa50d6618.tar.gz
glibc-7ac5b8e2fae145766821d141cf892bbfa50d6618.tar.bz2
glibc-7ac5b8e2fae145766821d141cf892bbfa50d6618.zip
Update.
* 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.
Diffstat (limited to 'nptl/pthread_join.c')
-rw-r--r--nptl/pthread_join.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/nptl/pthread_join.c b/nptl/pthread_join.c
index f77c2c9f98..f94128dd96 100644
--- a/nptl/pthread_join.c
+++ b/nptl/pthread_join.c
@@ -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;