9103 opengroup acknowledgement should be properly formatted in man pages
[unleashed.git] / usr / src / man / man3c / _stack_grow.3c
blob4d0cad8b91a7cadf82bd6f2fc72d400cefafac7c
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_GROW 3C "Jul 18, 2002"
7 .SH NAME
8 _stack_grow \- express an intention to extend the stack
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <ucontext.h>
14 \fBvoid *\fR\fB_stack_grow\fR(\fBvoid *\fR\fIaddr\fR);
15 .fi
17 .SH DESCRIPTION
18 .sp
19 .LP
20 The \fB_stack_grow()\fR function indicates to the system that the stack is
21 about to be extended to the address specified by \fIaddr\fR. If extending the
22 stack to this address would violate the stack boundaries as retreived by
23 \fBstack_getbounds\fR(3C), a \fBSIGSEGV\fR is raised.
24 .sp
25 .LP
26 If the disposition of \fBSIGSEGV\fR is \fBSIG_DFL\fR, the process is terminated
27 and a core dump is generated.  If the application has installed its own
28 \fBSIGSEGV\fR handler to run on the alternate signal stack, the signal
29 information passed to the handler will be such that a call to
30 \fBstack_violation\fR(3C) with these parameters returns 1.
31 .sp
32 .LP
33 The \fIaddr\fR argument is a biased stack pointer value. See the Solaris 64-bit
34 Developer's Guide.
35 .sp
36 .LP
37 This function has no effect if the specified address, \fIaddr\fR, is within the
38 bounds of the current stack.
39 .SH RETURN VALUES
40 .sp
41 .LP
42 If the \fB_stack_grow()\fR function  succeeds and does not detect a stack
43 violation, it returns \fIaddr\fR.
44 .SH ERRORS
45 .sp
46 .LP
47 No errors are defined.
48 .SH USAGE
49 .sp
50 .LP
51 The \fB_stack_grow()\fR function does not actually adjust the stack pointer
52 register. The caller is responsible for manipulating the stack pointer register
53 once \fB_stack_grow()\fR returns.
54 .sp
55 .LP
56 The \fB_stack_grow()\fR function is typically invoked by code created by the
57 compilation environment prior to executing code that modifies the stack
58 pointer. It can also be used by hand-written assembly routines to allocate
59 stack-based storage safely.
60 .SH ATTRIBUTES
61 .sp
62 .LP
63 See \fBattributes\fR(5) for descriptions of the following attributes:
64 .sp
66 .sp
67 .TS
68 box;
69 c | c
70 l | l .
71 ATTRIBUTE TYPE  ATTRIBUTE VALUE
73 Interface Stability     Evolving
75 MT-Level        Async-Signal-Safe
76 .TE
78 .SH SEE ALSO
79 .sp
80 .LP
81 \fBstack_getbounds\fR(3C), \fBstack_inbounds\fR(3C), \fBstack_violation\fR(3C),
82 \fBattributes\fR(5)
83 .sp
84 .LP
85 Solaris 64-bit Developer's Guide