gcc-6: use $(GNU_ARCH) in manifest
[unleashed-userland.git] / components / libsigsegv / man3 / sigsegv.3
blob5e423f8ace35137e9087a02ccd8e1705358b0464
1 .\"
2 .\" CDDL HEADER START
3 .\"
4 .\" The contents of this file are subject to the terms of the
5 .\" Common Development and Distribution License (the "License").
6 .\" You may not use this file except in compliance with the License.
7 .\"
8 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 .\" or http://www.opensolaris.org/os/licensing.
10 .\" See the License for the specific language governing permissions
11 .\" and limitations under the License.
12 .\"
13 .\" When distributing Covered Code, include this CDDL HEADER in each
14 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 .\" If applicable, add the following below this CDDL HEADER, with the
16 .\" fields enclosed by brackets "[]" replaced with your own identifying
17 .\" information: Portions Copyright [yyyy] [name of copyright owner]
18 .\"
19 .\" CDDL HEADER END
20 .\"
21 .\" Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
22 .\"
23 .\"
24 .TH SIGSEGV 3 "13 Jan 2009" "SunOS 5.11"
25 .SH NAME
26 sigsegv  \-  Handling page faults in user mode
27 .sp
28 .SH SYNOPSIS
29 .sp
30 #include <\fBsigsegv.h\fR>
31 .sp
32 .SH DESCRIPTION
33 .sp
34 .LP
35 Sigsegv is a set of functions for handling page faults in user mode. Multithreading is used to improve the performance of a program.A page fault occurs when a program tries to access to a region of memory that is currently not available. Catching and handling a page fault is a useful technique for implementing:
36 .RS +4
37 .TP
38 .ie t \(bu
39 .el o
40 pageable virtual memory
41 .RE
42 .RS +4
43 .TP
44 .ie t \(bu
45 .el o
46 memory-mapped access to persistent databases
47 .RE
48 .RS +4
49 .TP
50 .ie t \(bu
51 .el o
52 generational garbage collectors
53 .RE
54 .RS +4
55 .TP
56 .ie t \(bu
57 .el o
58 stack overflow handlers
59 .RE
60 .RS +4
61 .TP
62 .ie t \(bu
63 .el o
64 distributed shared memory
65 .RE
66 .RS +4
67 .TP
68 .ie t \(bu
69 .el o
70  ...
71 .RE
72 .sp
73 .LP  
74 The sigsegv functions are summarized in this section in the following
75 groups:
76 .sp
77 .RS +4
78 .TP
79 .ie t \(bu
80 .el o  
81 Global SIGSEGV handlers
82 .RE
83 .RS +4
84 .TP
85 .ie t \(bu
86 .el o
87 Local SIGSEGV handlers (a handler per memory area)
88 .RE
89 .RS +4
90 .TP
91 .ie t \(bu
92 .el o
93 Stack overflow handlers
94 .RE
95 .sp
96 .LP
97 The <sigsegv.h> header defines the following symbols:
98 .sp
99 .RS +4
101 .ie t \(bu
102 .el o
103 HAVE_SIGSEGV_RECOVERY
105 .RS +4
107 .ie t \(bu
108 .el o
109 HAVE_STACK_OVERFLOW_RECOVERY
111 .RS +4
113 .ie t \(bu
114 .el o
115 LIBSIGSEGV_VERSION
119 The types listed below are defined as described in <sigsegv.h>:
120 .RS +4
122 .ie t \(bu
123 .el o
124 sigsegv_handler_t
126 .RS +4
128 .ie t \(bu
129 .el o
130 sigsegv_handler_t
132 .RS +4
134 .ie t \(bu
135 .el o
136 stackoverflow_context_t
138 .RS +4
140 .ie t \(bu
141 .el o
142 sigsegv_area_handler_t
145 .SH GLOBAL SIGSEGV HANDLERS
147 int \fBsigsegv_install_handler\fR (sigsegv_handler_t handler);
149 void \fBsigsegv_deinstall_handler\fR (void);
151 .SH LOCAL SIGSEGV HANDLERS
153 void \fBsigsegv_init\fR (sigsegv_dispatcher* dispatcher);
155 void* \fBsigsegv_register\fR (sigsegv_dispatcher* dispatcher,
156 .RS +24
157 void* address, unsigned long len, 
158 sigsegv_area_handler_t handler,
159 void* handler_arg);
162 void \fBsigsegv_unregister\fR (sigsegv_dispatcher* dispatcher, 
163 .RS +25
164 void* ticket);
167 int \fBsigsegv_dispatch\fR (sigsegv_dispatcher* dispatcher, 
168 .RS +22
169 void* fault_address);
172 .SH STACK OVERFLOW HANDLERS
174 int \fBstackoverflow_install_handler\fR (stackoverflow_handler_t
175 .RS +27
176 handler, void* extra_stack,
177 unsigned long extra_stack_size);
180 void \fBstackoverflow_deinstall_handler\fR (void);
182 .SH SEE ALSO
185 \fBattributes\fR(5), \fBsigsegv\fR(3), \fBstandards\fR(5), \fBsigsegv_install_handler, \fBsigsegv_deinstall_handler\fR(3), \fBsigsegv_init\fR(3), \fBsigsegv_register\fR(3), \fBsigsegv_unregister\fR(3), \fBsigsegv_dispatch\fR(3), \fBstackoverflow_install_handler\fR(3), \fBstackoverflow_deinstall_handler\fR(3)