From c4103b34805bc2694ec7232005eb9cf66d3f7c67 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 13 Apr 2001 04:12:32 +0000 Subject: Update. 2001-04-12 Ulrich Drepper * sysdeps/ia64/Dist: Add elf/entry.h. * iconvdata/Makefile (distribute): Add TESTS2. --- linuxthreads_db/td_thr_validate.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'linuxthreads_db/td_thr_validate.c') diff --git a/linuxthreads_db/td_thr_validate.c b/linuxthreads_db/td_thr_validate.c index 81c3b50214..7ca3af20b6 100644 --- a/linuxthreads_db/td_thr_validate.c +++ b/linuxthreads_db/td_thr_validate.c @@ -1,5 +1,5 @@ /* Validate a thread handle. - Copyright (C) 1999 Free Software Foundation, Inc. + Copyright (C) 1999, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1999. @@ -41,9 +41,15 @@ td_thr_validate (const td_thrhandle_t *th) if (phc.h_descr != NULL && phc.h_descr == th->th_unique) { + struct _pthread_descr_struct pds; + + if (ps_pdread (th->th_ta_p->ph, phc.h_descr, &pds, + th->th_ta_p->sizeof_descr) != PS_OK) + return TD_ERR; /* XXX Other error value? */ + /* XXX There should be another test using the TID but this is currently not available. */ - return TD_OK; + return pds.p_terminated != 0 ? TD_NOTHR : TD_OK; } } -- cgit v1.2.3