/* 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.
{
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_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. */