8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / lib / libc / inc / sigjmp_struct.h
blob988e6ca14ca8a8c082cf3488fb9634853954a112
1 /*
2 * CDDL HEADER START
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.
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.
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]
19 * CDDL HEADER END
23 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
26 #ifndef _SIGJMP_STRUCT_H
27 #define _SIGJMP_STRUCT_H
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
33 #include <sys/types.h>
34 #include <sys/stack.h>
35 #include <ucontext.h>
36 #include <setjmp.h>
38 #if defined(__sparc)
41 * The following structure MUST match the ABI size specifier _SIGJBLEN.
42 * This is 19 (longs). The ABI value for _JBLEN is 12 (longs).
43 * A greg_t is a long. A sigset_t is 4 ints and a stack_t is 3 longs.
45 * The layout of this structure must match the layout of the same
46 * structures defined in usr/src/lib/libbc/libc/sys/common/ucontext.h
47 * and usr/src/ucblib/libucb/sparc/sys/setjmp.c. Other than that,
48 * the layout is private, not known to applications.
50 * We make the first 5 members match the implementations of
51 * setjmp()/longjmp(), so that an application could (stupidly)
52 * do sigsetjmp(env) followed by longjmp(env) (but not setjmp(env)
53 * followed by siglongjmp(env)).
55 typedef struct {
56 int sjs_flags; /* JBUF[ 0] */
57 greg_t sjs_sp; /* JBUF[ 1] */
58 greg_t sjs_pc; /* JBUF[ 2] */
59 greg_t sjs_fp; /* JBUF[ 3] */
60 greg_t sjs_i7; /* JBUF[ 4] */
61 ucontext_t *sjs_uclink;
62 ulong_t sjs_pad[_JBLEN - 6];
63 sigset_t sjs_sigmask;
64 #if defined(_LP64)
65 greg_t sjs_asi;
66 greg_t sjs_fprs;
67 #endif
68 stack_t sjs_stack;
69 } sigjmp_struct_t;
71 #define JB_SAVEMASK 0x1
72 #define JB_FRAMEPTR 0x2
74 #endif /* __sparc */
76 #ifdef __cplusplus
78 #endif
80 #endif /* _SIGJMP_STRUCT_H */