Skip to content

Commit

Permalink
(td_thr_get_info): Set ti_state to TD_THR_ACTIVE instead of TD_THR_RU…
Browse files Browse the repository at this point in the history
…N. If the thread is no longer running but is still joinable, set it to TD_THR_ZOMBIE. Otherwise set it to TD_THR_UNKNOWN.
  • Loading branch information
Ulrich Drepper committed Apr 27, 2000
1 parent 159a2a5 commit 78477e4
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions linuxthreads_db/td_thr_get_info.c
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -46,21 +46,22 @@ 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
{
infop->ti_tid = pds.p_tid;
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. */
Expand Down

0 comments on commit 78477e4

Please sign in to comment.