1.\"
2.\" This file and its contents are supplied under the terms of the
3.\" Common Development and Distribution License ("CDDL"), version 1.0.
4.\" You may only use this file in accordance with the terms of version
5.\" 1.0 of the CDDL.
6.\"
7.\" A full copy of the text of the CDDL should have accompanied this
8.\" source.  A copy of the CDDL is also available via the Internet at
9.\" http://www.illumos.org/license/CDDL.
10.\"
11.\"
12.\" Copyright 2015 Joyent, Inc.
13.\"
14.Dd November 27, 2023
15.Dt LSTATUS 3PROC
16.Os
17.Sh NAME
18.Nm Lstatus
19.Nd obtain thread status structure
20.Sh LIBRARY
21.Lb libproc
22.Sh SYNOPSIS
23.In libproc.h
24.Ft "const lwpstatus_t *"
25.Fo Pstatus
26.Fa "struct ps_lwphandle *L"
27.Fc
28.Sh DESCRIPTION
29The
30.Fn Lstatus
31function returns the status information about the thread handle
32.Fa L .
33The
34.Sy lwpstatus_t
35structure is defined in
36.Xr proc 5
37and contains information about the thread including its flags, the size
38of its stack, its user and system time, and more.
39.Pp
40The returned pointer is only valid as long as the thread handle
41.Fa L
42is valid.
43After a call to
44.Xr Lfree 3PROC ,
45the returned data pointer is invalid.
46.Sh RETURN VALUES
47Upon successful completion, the
48.Fn Lstatus
49function returns a pointer to the status information of the process.
50It always succeeds.
51.Sh INTERFACE STABILITY
52.Sy Uncommitted
53.Sh MT-LEVEL
54See
55.Sy LOCKING
56in
57.Xr libproc 3LIB .
58.Sh SEE ALSO
59.Xr libproc 3LIB ,
60.Xr Lfree 3PROC ,
61.Xr proc 5
62