summaryrefslogtreecommitdiff
path: root/usr/src/lib/libc/inc/sigjmp_struct.h
diff options
context:
space:
mode:
authorstevel@tonic-gate <none@none>2005-06-14 00:00:00 -0700
committerstevel@tonic-gate <none@none>2005-06-14 00:00:00 -0700
commit7c478bd95313f5f23a4c958a745db2134aa03244 (patch)
treec871e58545497667cbb4b0a4f2daf204743e1fe7 /usr/src/lib/libc/inc/sigjmp_struct.h
downloadillumos-gate-7c478bd95313f5f23a4c958a745db2134aa03244.tar.gz
OpenSolaris Launch
Diffstat (limited to 'usr/src/lib/libc/inc/sigjmp_struct.h')
-rw-r--r--usr/src/lib/libc/inc/sigjmp_struct.h82
1 files changed, 82 insertions, 0 deletions
diff --git a/usr/src/lib/libc/inc/sigjmp_struct.h b/usr/src/lib/libc/inc/sigjmp_struct.h
new file mode 100644
index 0000000000..3a3ce1ebc5
--- /dev/null
+++ b/usr/src/lib/libc/inc/sigjmp_struct.h
@@ -0,0 +1,82 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (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 2004 Sun Microsystems, Inc. All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef _SIGJMP_STRUCT_H
+#define _SIGJMP_STRUCT_H
+
+#pragma ident "%Z%%M% %I% %E% SMI"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <sys/types.h>
+#include <sys/stack.h>
+#include <ucontext.h>
+#include <setjmp.h>
+
+#if defined(__sparc)
+
+/*
+ * The following structure MUST match the ABI size specifier _SIGJBLEN.
+ * This is 19 (longs). The ABI value for _JBLEN is 12 (longs).
+ * A greg_t is a long. A sigset_t is 4 ints and a stack_t is 3 longs.
+ *
+ * The layout of this structure must match the layout of the same
+ * structures defined in usr/src/lib/libbc/libc/sys/common/ucontext.h
+ * and usr/src/ucblib/libucb/sparc/sys/setjmp.c. Other than that,
+ * the layout is private, not known to applications.
+ *
+ * We make the first 5 members match the implementations of
+ * setjmp()/longjmp(), so that an application could (stupidly)
+ * do sigsetjmp(env) followed by longjmp(env) (but not setjmp(env)
+ * followed by siglongjmp(env)).
+ */
+typedef struct {
+ int sjs_flags; /* JBUF[ 0] */
+ greg_t sjs_sp; /* JBUF[ 1] */
+ greg_t sjs_pc; /* JBUF[ 2] */
+ greg_t sjs_fp; /* JBUF[ 3] */
+ greg_t sjs_i7; /* JBUF[ 4] */
+ ucontext_t *sjs_uclink;
+ ulong_t sjs_pad[_JBLEN - 6];
+ sigset_t sjs_sigmask;
+#if defined(_LP64)
+ ulong_t sjs_pad1[2];
+#endif
+ stack_t sjs_stack;
+} sigjmp_struct_t;
+
+#define JB_SAVEMASK 0x1
+#define JB_FRAMEPTR 0x2
+
+#endif /* __sparc */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _SIGJMP_STRUCT_H */