aboutsummaryrefslogtreecommitdiff
path: root/linuxthreads/internals.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-06-10 07:45:56 +0000
committerUlrich Drepper <drepper@redhat.com>2000-06-10 07:45:56 +0000
commitee5d48553adde607b88bcbb1ac533d88f6a0207a (patch)
treee0a9ad909098c846e12a634b8d3b4111b24d9b6f /linuxthreads/internals.h
parent7e6d3809908ca640e5334ced033d6f905783731a (diff)
downloadglibc-ee5d48553adde607b88bcbb1ac533d88f6a0207a.tar
glibc-ee5d48553adde607b88bcbb1ac533d88f6a0207a.tar.gz
glibc-ee5d48553adde607b88bcbb1ac533d88f6a0207a.tar.bz2
glibc-ee5d48553adde607b88bcbb1ac533d88f6a0207a.zip
Update.
2000-06-10 Ulrich Drepper <drepper@redhat.com> * pthread.c (__pthread_create_2_1): Optimize a bit. * internals.h (invalid_handle): Also test for p_terminated != 0. (nonexisting_handle): New function. Same as old invalid_handle. * join.c (pthread_join): Use nonexisting_handle instead of invalid_handle to test for acceptable thread handle. Reported by Permaine Cheung <pcheung@cygnus.com>.
Diffstat (limited to 'linuxthreads/internals.h')
-rw-r--r--linuxthreads/internals.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/linuxthreads/internals.h b/linuxthreads/internals.h
index c523d6f23b..405af3c0df 100644
--- a/linuxthreads/internals.h
+++ b/linuxthreads/internals.h
@@ -298,6 +298,11 @@ static inline pthread_handle thread_handle(pthread_t id)
static inline int invalid_handle(pthread_handle h, pthread_t id)
{
+ return h->h_descr == NULL || h->h_descr->p_tid != id || h->h_descr->p_terminated;
+}
+
+static inline int nonexisting_handle(pthread_handle h, pthread_t id)
+{
return h->h_descr == NULL || h->h_descr->p_tid != id;
}