2 .\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH GETUSTACK 2 "Nov 2, 2004"
8 getustack, setustack \- retrieve or change the address of per-LWP stack
15 \fBint\fR \fBgetustack\fR(\fBstack_t **\fR\fIspp\fR);
20 \fBint\fR \fBsetustack\fR(\fBstack_t *\fR\fIsp\fR);
26 The \fBgetustack()\fR function retrieves the address of per-LWP stack boundary
27 information. The address is stored at the location pointed to by \fIspp\fR. If
28 this address has not been defined using a previous call to \fBsetustack()\fR,
29 \fINULL\fR is stored at the location pointed to by \fIspp\fR.
32 The \fBsetustack()\fR function changes the address of the current thread's
33 stack boundary information to the value of \fIsp\fR.
37 Upon successful completion, these functions return 0. Otherwise, \(mi1 is
38 returned and \fBerrno\fR is set to indicate the error.
42 These functions will fail if:
49 The \fIspp\fR or \fIsp\fR argument does not refer to a valid address.
55 Only implementors of custom threading libraries should use these functions to
56 get and set the address of the stack bound to an internal per-thread data
57 structure. Other users should use \fBstack_getbounds\fR(3C) and
58 \fBstack_setbounds\fR(3C).
62 See \fBattributes\fR(5) for descriptions of the following attributes:
70 ATTRIBUTE TYPE ATTRIBUTE VALUE
72 Interface Stability Evolving
74 MT-Level Async-Signal-Safe
80 \fB_stack_grow\fR(3C), \fBstack_getbounds\fR(3C), \fBstack_inbounds\fR(3C),
81 \fBstack_setbounds\fR(3C), \fBstack_violation\fR(3C), \fBattributes\fR(5)