9103 opengroup acknowledgement should be properly formatted in man pages
[unleashed.git] / usr / src / man / man3c / stack_setbounds.3c
blobc64098947930b60359835413034234dbe8ebceef
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_SETBOUNDS 3C "Jul 18, 2002"
7 .SH NAME
8 stack_setbounds \- update stack boundaries
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <ucontext.h>
14 \fBint\fR \fBstack_setbounds\fR(\fBconst stack_t *\fR\fIsp\fR);
15 .fi
17 .SH DESCRIPTION
18 .sp
19 .LP
20 The \fBstack_setbounds()\fR function updates the current base and bounds of the
21 stack for the current thread to the bounds specified by the \fBstack_t\fR
22 structure pointed to by \fIsp\fR. The \fBss_sp\fR member refers to the virtual
23 address of the base of the stack memory. The \fBss_size\fR member refers to the
24 size of the stack in bytes. The \fBss_flags\fR member must be set to 0.
25 .SH RETURN VALUES
26 .sp
27 .LP
28 Upon successful completion, \fBstack_setbounds()\fR returns 0. Otherwise, \(mi1
29 is returned and \fBerrno\fR is set to indicate the error.
30 .SH ERRORS
31 .sp
32 .LP
33 The \fBstack_setbounds()\fR function will fail if:
34 .sp
35 .ne 2
36 .na
37 \fB\fBEFAULT\fR\fR
38 .ad
39 .RS 10n
40 The \fIsp\fR argument does not refer to a valid address or the \fBss_sp\fR
41 member of the \fBstack_t\fR structure pointed to by \fIsp\fR points to an
42 illegal address.
43 .RE
45 .sp
46 .ne 2
47 .na
48 \fB\fBEINVAL\fR\fR
49 .ad
50 .RS 10n
51 The \fBss_sp\fR member of the \fBstack_t\fR structure pointed to by sp is not
52 properly aligned, the \fBss_size\fR member is too small or is not properly
53 aligned, or the \fBss_flags\fR member is non-zero.
54 .RE
56 .SH USAGE
57 .sp
58 .LP
59 The \fBstack_setbounds()\fR function is intended for use by applications that
60 are managing their own alternate stacks.
61 .SH ATTRIBUTES
62 .sp
63 .LP
64 See \fBattributes\fR(5) for descriptions of the following attributes:
65 .sp
67 .sp
68 .TS
69 box;
70 c | c
71 l | l .
72 ATTRIBUTE TYPE  ATTRIBUTE VALUE
74 Interface Stability     Evolving
76 MT-Level        Async-Signal-Safe
77 .TE
79 .SH SEE ALSO
80 .sp
81 .LP
82 \fBgetustack\fR(2), \fB_stack_grow\fR(3C), \fBstack_getbounds\fR(3C),
83 \fBstack_inbounds\fR(3C), \fBstack_violation\fR(3C), \fBattributes\fR(5)