PROC_GET_LWPSINFO(3PROC) Process Control Library Functions

NAME


proc_get_lwpsinfo, proc_get_lwpstatus - get thread ps and status
information

LIBRARY


Process Control Library (libproc, -lproc)

SYNOPSIS


#include <libproc.h>

int
proc_get_lwpsinfo(pid_t pid, uint_t thr, lwpsinfo_t *lwpps);

int
proc_get_lwpstatus(pid_t pid, uint_t thr, lwpstatus_t *lwpst);

DESCRIPTION


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 lwpps. The definition
of the lwpsinfo_t structure may be found in proc(5).

The proc_get_lwpstatus() function is a convenient way to read the /proc
lwpstatus for the specific thread, thr, found in the process pid. The
information from the lwpstatus file will be placed in lwpst. The
definition of the lwpstatus_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.

RETURN VALUES


Upon successful completion, the proc_get_lwpsinfo() and
proc_get_lwpstatus() functions return 0. Otherwise, -1 is returned to
indicate an error occurred.

INTERFACE STABILITY


Uncommitted

MT-LEVEL
MT-Safe

SEE ALSO


libproc(3LIB), proc(5)

illumos November 27, 2023 illumos