PROC_GET_LWPSINFO(3PROC) | Process Control Library Functions | PROC_GET_LWPSINFO(3PROC) |
proc_get_lwpsinfo
—
get thread ps information
Process Control Library (libproc, -lproc)
#include <libproc>
int
proc_get_lwpsinfo
(pid_t pid,
uint_t thr, lwpsinfo_t
*lwp);
The
proc_get_lwpsinfo
()
function is a convenient way to read the /proc lwpsinfo for the specific
thread, thr, found in the process
pid. The information from the
lwpsinfo file will be placed in
lwp. The definition of the
lwpsinfo_t structure may be found in
proc(5).
The thread identifier for a thread is the same between POSIX pthreads, C11 threads, and the native threads API. It is safe to pass one of those identifiers in as thr or to use a specific number.
Upon successful completion, the
proc_get_psinfo
() function returns
0. Otherwise,
-1 is returned
to indicate an error occurred.
October 3, 2021 | OmniOS |