TD_THR_INFO(3)

NAME
td_thr_info - get information on a thread

LIBRARY
libpthread_dbg

SYNOPSIS
#include <pthread_dbg.h>
int
td_thr_info(td_thread_t *thread, td_thread_info_t *info);

DESCRIPTION
The td_thr_info() function retrieves information on a thread specified in the thread argument and saves the result in info.

The following members are defined in the td_thread_info_t structure:
Name | Type | Description
thread_addr | caddr_t | Points to underlaying pthread_t object
thread_state | int | Defines TD_STATE of the thread

  Thread State types
The following state types are possible in thread_state:

TD_STATE_UNKNOWN | Unknown state
TD_STATE_RUNNING | Thread is alive
TD_STATE_ZOMBIE | Thread is in the zombie state
TD_STATE_DEAD | Thread is dead

It is not possible to retrieve information whether a thread is suspended or resumed using this interface, as this data is stored only inside the kernel and not in the pthread_t object. The TD_STATE_RUNNING name is kept for backwards compatibility with old Scheduler Activation threads. The TD_STATE_RUNNING state might only be returned for a mismatch between the versions of pthread(3) and pthread_dbg(3).

RETURN VALUES
If successful, the td_thr_info function will return TD_ERR_OK. Otherwise an error number will be returned to indicate failure as described in pthread_dbg(3).

SEE ALSO
pthread(3), pthread_dbg(3)

HISTORY
The td_thr_info function first appeared in NetBSD 2.0.

AUTHORS
-nosplit Nathan J. Williams <nathanw@NetBSD.org>

This manual page was written by Kamil Rytarowski <kamil@NetBSD.org>.