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
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.
12 .\" Copyright 2015 Joyent, Inc.
24 .Nd get thread stack information
30 .Fa "struct ps_prochandle *P"
36 .Fa "struct ps_prochandle *P"
42 .Fa "struct ps_prochandle *P"
48 .Fa "struct ps_lwphandle *L"
53 .Fa "struct ps_lwphandle *L"
58 .Fa "struct ps_lwphandle *L"
67 functions obtain information about the size and address of the stacks
68 for the thread identified by
73 Each thread in a process has its own stack which is used both for
74 maintaining function call sequences and the storing of local variables.
75 A thread may also configure a different stack to handle specific
77 This stack is often called the
79 Whether or not the alternate stack is used may be controlled through the
89 with the information about the thread's currently executing stack,
90 whether the alternate or main one.
96 with the information about the thread's alternate stack, if it's
103 with the information about the thread's main stack, regardless of if there
104 is an alternate stack or it is executing one.
106 Process handles that refer to files, obtained through
107 .Xr Pgrab_file 3PROC ,
108 do not have any stack information and these functions will always fail
116 functions are identical to the
118 .Fn Plwp_main_stack ,
121 functions, except rather than specifying a thread to operate on, they
122 operate on the thread handle
124 which specifies the thread to operate on.
126 Upon successful completion, the
129 .Fn Plwp_main_stack ,
138 with information about the appropriate stack.
143 is updated with the error, and
147 For a full list of possible errors also see the
157 function will fail if:
162 refers to a grabbed file, not an active process or core.
166 refers to a core file and the specified thread does not exist.
170 refers to an active process and the specified thread does not exist.
177 functions will fail if:
180 The thread identified by
182 did not have an alternate stack enabled.
184 .Sh INTERFACE STABILITY