PROC_GET_LWPSINFO(3PROC) Process Control Library Functions PROC_GET_LWPSINFO(3PROC)

proc_get_lwpsinfo, proc_get_lwpstatusget thread ps and status information

Process Control Library (libproc, -lproc)

#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);

The () 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 () 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.

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

libproc(3LIB), proc(5)

November 27, 2023 OmniOS