Print this page
8158 Want named threads API
9857 proc manpages should have LIBRARY section
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3proc/Plwp_getpsinfo.3proc
+++ new/usr/src/man/man3proc/Plwp_getpsinfo.3proc
1 1 .\"
2 2 .\" This file and its contents are supplied under the terms of the
3 3 .\" Common Development and Distribution License ("CDDL"), version 1.0.
4 4 .\" You may only use this file in accordance with the terms of version
5 5 .\" 1.0 of the CDDL.
6 6 .\"
7 7 .\" A full copy of the text of the CDDL should have accompanied this
8 8 .\" source. A copy of the CDDL is also available via the Internet at
9 9 .\" http://www.illumos.org/license/CDDL.
↓ open down ↓ |
9 lines elided |
↑ open up ↑ |
10 10 .\"
11 11 .\"
12 12 .\" Copyright 2015 Joyent, Inc.
13 13 .\"
14 14 .Dd May 11, 2016
15 15 .Dt PLWP_GETPSINFO 3PROC
16 16 .Os
17 17 .Sh NAME
18 18 .Nm Plwp_getpsinfo
19 19 .Nd get thread specific ps information
20 -.Sh SYNOPSIS
20 +.Sh LIBRARY
21 21 .Lb libproc
22 +.Sh SYNOPSIS
22 23 .In libproc.h
23 24 .Ft int
24 25 .Fo Plwp_getpsinfo
25 26 .Fa "struct ps_prochandle *P"
26 27 .Fa "lwpid_t lwpid"
27 28 .Fa "lwpsinfo_t *lps"
28 29 .Fc
29 30 .Sh DESCRIPTION
30 31 The
31 32 .Fn Plwp_getpsinfo
32 33 function
33 34 looks up the thread-specific
34 35 .Xr ps 1
35 36 information for the thread specified by
36 37 .Fa lwpid
37 38 in the process handle
38 39 .Fa P .
39 40 The caller should provide a pointer to an
40 41 .Sy lwpsinfo_t ,
41 42 .Fa lps ,
42 43 whose definition can be found in
43 44 .Xr proc 4 .
44 45 .Fa lps
45 46 will be filled in with information such as the thread's id, its current
46 47 state, priority, and run-time.
47 48 .Pp
48 49 The
49 50 .Fn Plwp_getpsinfo
50 51 function only works on process handles that refer to active processes
51 52 and core files, it does not work on process handles that refer to
52 53 individual files.
53 54 .Sh RETURN VALUES
54 55 Upon successful completion, the
55 56 .Fn Plwp_getpsinfo
56 57 function returns
57 58 .Sy 0
58 59 and
59 60 .Fa lps
60 61 is filled in with the
61 62 thread-specific
62 63 .Xr ps 1
63 64 information.
64 65 Otherwise,
65 66 .Sy -1
66 67 is returned and
67 68 .Sy errno
68 69 is set to indicate the error.
69 70 .Sh ERRORS
70 71 For a full list of possible errors also see the
71 72 .Sy DIAGNOSTICS
72 73 section in
73 74 .Xr proc 4 .
74 75 .Pp
75 76 The
76 77 .Fn Plwp_getpsinfo
77 78 function will fail if:
78 79 .Bl -tag -width Er
79 80 .It Er ENODATA
80 81 .Fa P
81 82 refers to a file handle obtained through
82 83 .Xr Pgrab_file 3PROC .
83 84 .It Er EINVAL
84 85 The process handle
85 86 .Fa P
86 87 refers to a core file and the specified thread does not exist.
87 88 .It Er ENOENT
88 89 The process handle
89 90 .Fa P
90 91 refers to an active process and the specified thread does not exist.
91 92 .El
92 93 .Sh INTERFACE STABILITY
93 94 .Sy Uncommitted
94 95 .Sh MT-LEVEL
95 96 See
96 97 .Sy LOCKING
97 98 in
98 99 .Xr ps 1 ,
99 100 .Xr libproc 3LIB .
100 101 .Sh SEE ALSO
101 102 .Xr libproc 3LIB ,
102 103 .Xr proc 4
↓ open down ↓ |
71 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX