aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-04-27 18:26:29 +0000
committerUlrich Drepper <drepper@redhat.com>2000-04-27 18:26:29 +0000
commit78477e4843c34f2ad54d25975758c3342746d0cd (patch)
tree2f2b01d05cf131d97072df39de67b047ab139326
parent159a2a51151fb3140ea67ab5381458df9c1ebb5b (diff)
downloadglibc-78477e4843c34f2ad54d25975758c3342746d0cd.tar
glibc-78477e4843c34f2ad54d25975758c3342746d0cd.tar.gz
glibc-78477e4843c34f2ad54d25975758c3342746d0cd.tar.bz2
glibc-78477e4843c34f2ad54d25975758c3342746d0cd.zip
(td_thr_get_info): Set ti_state to TD_THR_ACTIVE instead of TD_THR_RUN. If the thread is no longer running but is still joinable, set it to TD_THR_ZOMBIE. Otherwise set it to TD_THR_UNKNOWN.
-rw-r--r--linuxthreads_db/td_thr_get_info.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/linuxthreads_db/td_thr_get_info.c b/linuxthreads_db/td_thr_get_info.c
index 25ad3408a9..d8f02eefac 100644
--- a/linuxthreads_db/td_thr_get_info.c
+++ b/linuxthreads_db/td_thr_get_info.c
@@ -1,5 +1,5 @@
/* Get thread information.
- Copyright (C) 1999 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
@@ -46,7 +46,7 @@ td_thr_get_info (const td_thrhandle_t *th, td_thrinfo_t *infop)
{
infop->ti_tid = th->th_ta_p->pthread_threads_max * 2 + 1;
infop->ti_type = TD_THR_SYSTEM;
- infop->ti_state = TD_THR_RUN;
+ infop->ti_state = TD_THR_ACTIVE;
}
else
{
@@ -54,13 +54,14 @@ td_thr_get_info (const td_thrhandle_t *th, td_thrinfo_t *infop)
infop->ti_tls = (char *) pds.p_specific;
infop->ti_pri = pds.p_priority;
infop->ti_type = TD_THR_USER;
-
- if (pds.p_exited)
- /* This should not happen. */
+
+ if (! pds.p_terminated)
+ /* XXX For now there is no way to get more information. */
+ infop->ti_state = TD_THR_ACTIVE;
+ else if (! pds.p_detached)
infop->ti_state = TD_THR_ZOMBIE;
else
- /* XXX For now there is no way to get more information. */
- infop->ti_state = TD_THR_RUN;
+ infop->ti_state = TD_THR_UNKNOWN;
}
/* Initialization which are the same in both cases. */