nightly: remove unused BINARCHIVE
[unleashed.git] / share / man / man3c / stack_getbounds.3c
bloba98bd6c491c25e283a49214c1db54143d5c61e28
1 '\" te
2 .\" Copyright (c) 2002, 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 STACK_GETBOUNDS 3C "Jul 18, 2002"
7 .SH NAME
8 stack_getbounds \- retrieve stack boundaries
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <ucontext.h>
14 \fBint\fR \fBstack_getbounds\fR(\fBstack_t *\fR\fIsp\fR);
15 .fi
17 .SH DESCRIPTION
18 .sp
19 .LP
20 The \fBstack_getbounds()\fR function retrieves the stack boundaries that the
21 calling thread is currently operating on. If the thread is currently operating
22 on the alternate signal stack, this function will retrieve the bounds of that
23 stack.
24 .sp
25 .LP
26 If successful, \fBstack_getbounds()\fR sets the \fBss_sp\fR member of the
27 \fBstack_t\fR structure pointed to by \fIsp\fR to the base of the stack region
28 and the \fBss_size\fR member to its size (maximum extent) in bytes. The
29 \fBss_flags\fR member is set to \fBSS_ONSTACK\fR if the calling thread is
30 executing on its alternate signal stack, and zero otherwise.
31 .SH RETURN VALUES
32 .sp
33 .LP
34 Upon successful completion, \fBstack_getbounds()\fR returns 0. Otherwise, \(mi1
35 is returned and \fBerrno\fR is set to indicate the error.
36 .SH ERRORS
37 .sp
38 .LP
39 The \fBstack_getbounds()\fR function will fail if:
40 .sp
41 .ne 2
42 .na
43 \fB\fBEFAULT\fR\fR
44 .ad
45 .RS 10n
46 The \fIsp\fR argument does not refer to a valid address.
47 .RE
49 .SH ATTRIBUTES
50 .sp
51 .LP
52 See \fBattributes\fR(5) for descriptions of the following attributes:
53 .sp
55 .sp
56 .TS
57 box;
58 c | c
59 l | l .
60 ATTRIBUTE TYPE  ATTRIBUTE VALUE
62 Interface Stability     Evolving
64 MT-Level        Async-Signal-Safe
65 .TE
67 .SH SEE ALSO
68 .sp
69 .LP
70 \fBgetustack\fR(2), \fBsigaction\fR(2), \fBsigaltstack\fR(2),
71 \fBstack_setbounds\fR(3C), \fBattributes\fR(5)