Print this page
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/head/ucontext.h
+++ new/usr/src/head/ucontext.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21 /* Copyright (c) 1988 AT&T */
22 22 /* All Rights Reserved */
23 23
24 24
25 25 /*
26 26 * Copyright 2014 Garrett D'Amore <garrett@damore.org>
27 27 * Copyright 2023 Oxide Computer Company
28 28 *
29 29 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
30 30 * Use is subject to license terms.
31 31 */
32 32
33 33 #ifndef _UCONTEXT_H
34 34 #define _UCONTEXT_H
35 35
36 36 #include <sys/ucontext.h>
37 37 /*
38 38 * The file sys/regset.h defines indices in the gregset_t array,
39 39 * such as EIP on i386. Those defines were historically exposed
40 40 * via sys/ucontext.h, sys/signal.h, etc. which caused surprises
41 41 * due to those defines unexpectedly polluting the namespace.
42 42 * On the other hand, several existing applications assume that
43 43 * the regset names are defined after an include <ucontext.h>.
44 44 * To solve both problems at once: <ucontext.h> (this file)
45 45 * DOES include sys/regset.h for you but <sys/ucontext.h>
46 46 * does NOT include sys/regset.h anymore.
47 47 */
48 48 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
49 49 #include <sys/regset.h>
50 50 #include <sys/siginfo.h>
51 51 #include <sys/int_types.h>
52 52 #endif
53 53
54 54 #ifdef __cplusplus
55 55 extern "C" {
56 56 #endif
57 57
58 58 #ifdef __sparc
59 59 #ifdef __PRAGMA_REDEFINE_EXTNAME
60 60 #pragma redefine_extname makecontext __makecontext_v2
61 61 #else
62 62 #define makecontext __makecontext_v2
63 63 #endif
64 64 #endif
65 65
66 66 extern int getcontext(ucontext_t *) __RETURNS_TWICE;
67 67 #pragma unknown_control_flow(getcontext)
68 68 extern int setcontext(const ucontext_t *);
69 69 extern int swapcontext(ucontext_t *_RESTRICT_KYWD,
70 70 const ucontext_t *_RESTRICT_KYWD);
71 71 extern void makecontext(ucontext_t *, void(*)(), int, ...);
72 72
73 73 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
74 74 extern ucontext_t *ucontext_alloc(uint32_t);
75 75 extern void ucontext_free(ucontext_t *);
76 76 extern int getcontext_extd(ucontext_t *, uint32_t) __RETURNS_TWICE;
77 77 #pragma unknown_control_flow(getcontext_extd)
78 78 extern int swapcontext_extd(ucontext_t *_RESTRICT_KYWD, uint32_t,
79 79 const ucontext_t *_RESTRICT_KYWD);
80 80 extern int walkcontext(const ucontext_t *, int (*)(uintptr_t, int, void *),
81 81 void *);
82 82 extern int printstack(int);
83 83 extern int addrtosymstr(void *, char *, int);
84 84 extern int getustack(stack_t **);
85 85 extern int setustack(stack_t *);
86 86
87 87 extern int stack_getbounds(stack_t *);
88 88 extern int stack_setbounds(const stack_t *);
89 89 extern int stack_inbounds(void *);
90 90 extern int stack_violation(int, const siginfo_t *, const ucontext_t *);
91 91
92 92 extern void *_stack_grow(void *);
93 93 #endif /* !_XPG4_2 || __EXTENSIONS__ */
94 94
95 95 #ifdef __cplusplus
96 96 }
97 97 #endif
98 98
99 99 #endif /* _UCONTEXT_H */
|
↓ open down ↓ |
99 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX