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
31 .Fa "struct ps_prochandle *P"
37 .Fa "struct ps_prochandle *P"
43 .Fa "struct ps_prochandle *P"
49 .Fa "struct ps_lwphandle *L"
54 .Fa "struct ps_lwphandle *L"
59 .Fa "struct ps_lwphandle *L"
68 functions obtain information about the size and address of the stacks
69 for the thread identified by
74 Each thread in a process has its own stack which is used both for
75 maintaining function call sequences and the storing of local variables.
76 A thread may also configure a different stack to handle specific
78 This stack is often called the
80 Whether or not the alternate stack is used may be controlled through the
90 with the information about the thread's currently executing stack,
91 whether the alternate or main one.
97 with the information about the thread's alternate stack, if it's
104 with the information about the thread's main stack, regardless of if there
105 is an alternate stack or it is executing one.
107 Process handles that refer to files, obtained through
108 .Xr Pgrab_file 3PROC ,
109 do not have any stack information and these functions will always fail
117 functions are identical to the
119 .Fn Plwp_main_stack ,
122 functions, except rather than specifying a thread to operate on, they
123 operate on the thread handle
125 which specifies the thread to operate on.
127 Upon successful completion, the
130 .Fn Plwp_main_stack ,
139 with information about the appropriate stack.
144 is updated with the error, and
148 For a full list of possible errors also see the
158 function will fail if:
163 refers to a grabbed file, not an active process or core.
167 refers to a core file and the specified thread does not exist.
171 refers to an active process and the specified thread does not exist.
178 functions will fail if:
181 The thread identified by
183 did not have an alternate stack enabled.
185 .Sh INTERFACE STABILITY