CDDL HEADER START

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.

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.

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]

CDDL HEADER END

Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.


SIGSEGV 3 "13 Jan 2009" "SunOS 5.11"
NAME
sigsegv - Handling page faults in user mode
SYNOPSIS
#include <sigsegv.h>
DESCRIPTION

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:

pageable virtual memory

memory-mapped access to persistent databases

generational garbage collectors

stack overflow handlers

distributed shared memory

...

The sigsegv functions are summarized in this section in the following groups:

Global SIGSEGV handlers

Local SIGSEGV handlers (a handler per memory area)

Stack overflow handlers

The <sigsegv.h> header defines the following symbols:

HAVE_SIGSEGV_RECOVERY

HAVE_STACK_OVERFLOW_RECOVERY

LIBSIGSEGV_VERSION

The types listed below are defined as described in <sigsegv.h>:

sigsegv_handler_t

sigsegv_handler_t

stackoverflow_context_t

sigsegv_area_handler_t

GLOBAL SIGSEGV HANDLERS
int sigsegv_install_handler (sigsegv_handler_t handler); void sigsegv_deinstall_handler (void);
LOCAL SIGSEGV HANDLERS
void sigsegv_init (sigsegv_dispatcher* dispatcher); void* sigsegv_register (sigsegv_dispatcher* dispatcher,

void* address, unsigned long len, sigsegv_area_handler_t handler, void* handler_arg);

void sigsegv_unregister (sigsegv_dispatcher* dispatcher,

void* ticket);

int sigsegv_dispatch (sigsegv_dispatcher* dispatcher,

void* fault_address);

STACK OVERFLOW HANDLERS
int stackoverflow_install_handler (stackoverflow_handler_t

handler, void* extra_stack, unsigned long extra_stack_size);

void stackoverflow_deinstall_handler (void);
SEE ALSO

attributes(7), sigsegv(3), standards(7), sigsegv_install_handler, sigsegv_deinstall_handler(3), sigsegv_init(3), sigsegv_register(3), sigsegv_unregister(3), sigsegv_dispatch(3), stackoverflow_install_handler(3), stackoverflow_deinstall_handler(3)