2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License (the "License").
2N/A * You may not use this file except in compliance with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A
2N/A/*
2N/A * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
2N/A */
2N/A
2N/A#ifndef _SIGJMP_STRUCT_H
2N/A#define _SIGJMP_STRUCT_H
2N/A
2N/A#ifdef __cplusplus
2N/Aextern "C" {
2N/A#endif
2N/A
2N/A#include <sys/types.h>
2N/A#include <sys/stack.h>
2N/A#include <ucontext.h>
2N/A#include <setjmp.h>
2N/A
2N/A#if defined(__sparc)
2N/A
2N/A/*
2N/A * The following structure MUST match the ABI size specifier _SIGJBLEN.
2N/A * This is 19 (longs). The ABI value for _JBLEN is 12 (longs).
2N/A * A greg_t is a long. A sigset_t is 4 ints and a stack_t is 3 longs.
2N/A *
2N/A * The layout of this structure must match the layout of the same
2N/A * structures defined in usr/src/lib/libbc/libc/sys/common/ucontext.h
2N/A * and usr/src/ucblib/libucb/sparc/sys/setjmp.c. Other than that,
2N/A * the layout is private, not known to applications.
2N/A *
2N/A * We make the first 5 members match the implementations of
2N/A * setjmp()/longjmp(), so that an application could (stupidly)
2N/A * do sigsetjmp(env) followed by longjmp(env) (but not setjmp(env)
2N/A * followed by siglongjmp(env)).
2N/A */
2N/Atypedef struct {
2N/A int sjs_flags; /* JBUF[ 0] */
2N/A greg_t sjs_sp; /* JBUF[ 1] */
2N/A greg_t sjs_pc; /* JBUF[ 2] */
2N/A greg_t sjs_fp; /* JBUF[ 3] */
2N/A greg_t sjs_i7; /* JBUF[ 4] */
2N/A ucontext_t *sjs_uclink;
2N/A ulong_t sjs_pad[_JBLEN - 6];
2N/A sigset_t sjs_sigmask;
2N/A#if defined(_LP64)
2N/A greg_t sjs_asi;
2N/A greg_t sjs_fprs;
2N/A#endif
2N/A stack_t sjs_stack;
2N/A} sigjmp_struct_t;
2N/A
2N/A#define JB_SAVEMASK 0x1
2N/A#define JB_FRAMEPTR 0x2
2N/A
2N/A#endif /* __sparc */
2N/A
2N/A#ifdef __cplusplus
2N/A}
2N/A#endif
2N/A
2N/A#endif /* _SIGJMP_STRUCT_H */