diff options
author | Ulrich Drepper <drepper@redhat.com> | 2001-04-13 04:12:32 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2001-04-13 04:12:32 +0000 |
commit | c4103b34805bc2694ec7232005eb9cf66d3f7c67 (patch) | |
tree | 08a6dbd40144f0a4294d08d7d742c62c1ed75f3c /linuxthreads_db/td_thr_validate.c | |
parent | a08877d0e029ed62dd55296a824d51355777f276 (diff) | |
download | glibc-c4103b34805bc2694ec7232005eb9cf66d3f7c67.tar.gz glibc-c4103b34805bc2694ec7232005eb9cf66d3f7c67.tar.xz glibc-c4103b34805bc2694ec7232005eb9cf66d3f7c67.zip |
Update.
2001-04-12 Ulrich Drepper <drepper@redhat.com> * sysdeps/ia64/Dist: Add elf/entry.h. * iconvdata/Makefile (distribute): Add TESTS2.
Diffstat (limited to 'linuxthreads_db/td_thr_validate.c')
-rw-r--r-- | linuxthreads_db/td_thr_validate.c | 10 |
1 files changed, 8 insertions, 2 deletions
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 <drepper@cygnus.com>, 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; } } |