From 7ac5b8e2fae145766821d141cf892bbfa50d6618 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 16 May 2003 22:09:32 +0000 Subject: 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. --- nptl/pthread_join.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'nptl/pthread_join.c') diff --git a/nptl/pthread_join.c b/nptl/pthread_join.c index f77c2c9..f94128d 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; -- cgit v1.1