| Skip Navigation Links | |
| Exit Print View | |
![]() | man pages section 3: Basic Library Functions Oracle Solaris 11 Information Library |
enable_extended_FILE_stdio(3C)
posix_spawnattr_getschedparam(3C)
posix_spawnattr_getschedpolicy(3C)
posix_spawnattr_getsigdefault(3C)
posix_spawnattr_getsigignore_np(3C)
posix_spawnattr_getsigmask(3C)
posix_spawnattr_setschedparam(3C)
posix_spawnattr_setschedpolicy(3C)
posix_spawnattr_setsigdefault(3C)
posix_spawnattr_setsigignore_np(3C)
posix_spawnattr_setsigmask(3C)
posix_spawn_file_actions_addclose(3C)
posix_spawn_file_actions_addclosefrom_np(3C)
posix_spawn_file_actions_adddup2(3C)
posix_spawn_file_actions_addopen(3C)
posix_spawn_file_actions_destroy(3C)
posix_spawn_file_actions_init(3C)
pthread_attr_getdetachstate(3C)
pthread_attr_getinheritsched(3C)
pthread_attr_getschedparam(3C)
pthread_attr_getschedpolicy(3C)
pthread_attr_setdetachstate(3C)
pthread_attr_setinheritsched(3C)
pthread_attr_setschedparam(3C)
pthread_attr_setschedpolicy(3C)
pthread_barrierattr_destroy(3C)
pthread_barrierattr_getpshared(3C)
pthread_barrierattr_setpshared(3C)
pthread_condattr_getpshared(3C)
pthread_condattr_setpshared(3C)
pthread_cond_reltimedwait_np(3C)
pthread_key_create_once_np(3C)
pthread_mutexattr_getprioceiling(3C)
pthread_mutexattr_getprotocol(3C)
pthread_mutexattr_getpshared(3C)
pthread_mutexattr_getrobust(3C)
pthread_mutexattr_setprioceiling(3C)
pthread_mutexattr_setprotocol(3C)
pthread_mutexattr_setpshared(3C)
pthread_mutexattr_setrobust(3C)
pthread_mutex_getprioceiling(3C)
pthread_mutex_reltimedlock_np(3C)
pthread_mutex_setprioceiling(3C)
pthread_rwlockattr_destroy(3C)
pthread_rwlockattr_getpshared(3C)
pthread_rwlockattr_setpshared(3C)
pthread_rwlock_reltimedrdlock_np(3C)
pthread_rwlock_reltimedwrlock_np(3C)
pthread_rwlock_timedrdlock(3C)
pthread_rwlock_timedwrlock(3C)
rctlblk_get_enforced_value(3C)
- get thread information in libc_db library of interfaces
cc [flag... ]file... -lc_db [library... ]#include <proc_service.h>#include <thread_db.h>td_err_etd_thr_get_info(const td_thrhandle_t *th_p,td_thrinfo_t *ti_p);
Thetd_thr_get_info() function fills in thetd_thrinfo_t structure *ti_p with valuesfor the thread identified byth_p.
Thetd_thrinfo_t structure contains the following fields:
typedef struct td_thrinfo_t { td_thragen_tx *ti_ta_p /* internal process handle */ unsigned ti_user_flags; /* value of flags parameter */ thread_t ti_tid; /* thread identifier */ char *ti_tls; /* pointer to thread-local storage*/ paddr ti_startfunc; /* address of function at which thread execution began*/ paddr ti_stkbase; /* base of thread's stack area*/ int ti_stksize; /* size in bytes of thread's allocated stack region*/ paddr ti_ro_area; /* address of ulwp_t structure*/ int ti_ro_size /* size of the ulwp_t structure in bytes */ td_thr_state_e ti_state /* state of the thread */ uchar_t ti_db_suspended /* non-zero if thread suspended by td_thr_dbsuspend*/ td_thr_type_e ti_type /* type of the thread*/ int ti_pc /* value of thread's program counter*/ int ti_sp /* value of thread's stack counter*/ short ti_flags /* set of special flags used by libc*/ int ti_pri /* priority of thread returned by thr_getprio(3T)*/ lwpid_t ti_lid /* id of light weight process (LWP) executing this thread*/ sigset_t ti_sigmask /* thread's signal mask. See thr_sigsetmask(3T)*/ u_char ti_traceme /* non-zero if event tracing is on*/ u_char_t ti_preemptflag /* non-zero if thread preempted when last active*/ u_char_t ti_pirecflag /* non-zero if thread runs priority beside regular */ sigset_t ti_pending /* set of signals pending for this thread*/ td_thr_events_t ti_events /* bitmap of events enabled for this thread*/} ;Theti_ta_p member is the internal process handle identifying the process ofwhich the thread is a member.
Theti_user_flags member is the value of the flags parameter passed tothr_create(3C) when the thread was created.
Theti_tid member is the thread identifier for the thread returned bythr_create(3C).
Theti_tls member is the thread's pointer to thread-local storage.
Theti_startfunc member is the address of the function at which threadexecution began, as specified when the thread was created withthr_create(3C).
Theti_stkbase member is the base of the thread's stack area.
Theti_stksize member is the size in bytes of the thread's allocatedstack region.
Theti_ro_area member is the address of theulwp_t structure for thisthread. Since accessing theulwp_t structure directly violates the encapsulation providedbylibc_db, this member should generally not be used. However, it mightbe useful as a prototype for extensions.
Theti_state member is the state of the thread. Thetd_thr_state_eenumeration type can contain the following values:
This value is never returned bytd_thr_get_info() but is used as a wildcard to select threads intd_ta_thr_iter().
Thelibc_db library cannot determine the state of the thread.
The thread has been stopped by a call tothr_suspend(3C).
The thread is runnable, but it is not currently assigned to an LWP.
The thread is currently executing on an LWP.
The thread has exited, but it has not yet been deallocated by a call tothr_join(3C).
The thread is not currently runnable.
The thread is both blocked byTD_THR_SLEEP and stopped by a call totd_thr_dbsuspend(3C_DB).
Theti_db_suspended member is non-zero if and only if this thread iscurrently suspended because the controlling process has calledtd_thr_dbsuspend on it.
Theti_type member is a type of thread. It is eitherTD_THR_USER for a user thread (one created by the application), orTD_THR_SYSTEMfor one created bylibc.
Theti_pc member is the value of the thread's program counter, providedthat the thread'sti_state value isTD_THR_SLEEP,TD_THR_STOPPED, orTD_THR_STOPPED_ASLEEP. Otherwise, thevalue of this member is undefined.
Theti_sp member is the value of the thread's stack pointer, providedthat the thread'sti_state value isTD_THR_SLEEP,TD_THR_STOPPED, orTD_THR_STOPPED_ASLEEP. Otherwise, thevalue of this member is undefined.
Theti_flags member is a set of special flags used bylibc,currently of use only to those debugginglibc.
Theti_pri member is the thread's priority as it would be returnedbythr_getprio(3C).
Theti_lid member is the ID of the LWP executing this thread,or the ID of the LWP that last executed this thread,if this thread is not currently assigned to anLWP.
Theti_sigmask member is this thread's signal mask. Seethr_sigsetmask(3C).
Theti_traceme member is non-zero if and only if event tracing forthis thread is on.
Theti_preemptflag member is non-zero if and only if the thread waspreempted the last time it was active.
Theti_pirecflag member is non-zero if and only if due to priorityinheritance the thread is currently running at a priority other than itsregular priority.
Theti_events member is the bitmap of events enabled for this thread.
The call completed successfully.
An invalid thread handle was passed in.
A call to one of the imported interface routines failed.
The call did not complete successfully.
Seeattributes(5) for description of the following attributes:
|
libc_db(3LIB),td_ta_thr_iter(3C_DB),td_thr_dbsuspend(3C_DB),thr_create(3C),thr_getprio(3C),thr_join(3C),thr_sigsetmask(3C),thr_suspend(3C),attributes(5),threads(5)
Copyright © 2011, Oracle and/or its affiliates. All rights reserved.Legal Notices | ![]() ![]() |