Print this page
XXX AVX procfs
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/intel/sys/ucontext.h
+++ new/usr/src/uts/intel/sys/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
22 22 /*
23 23 * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
24 24 * Use is subject to license terms.
25 25 */
26 26
27 27 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
28 28 /* All Rights Reserved */
29 29
30 30 #ifndef _SYS_UCONTEXT_H
31 31 #define _SYS_UCONTEXT_H
32 32
33 33 #include <sys/feature_tests.h>
34 34
35 35 #include <sys/types.h>
36 36 #include <sys/regset.h>
37 37 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
38 38 #include <sys/signal.h>
39 39 #endif
40 40
41 41 #ifdef __cplusplus
42 42 extern "C" {
43 43 #endif
44 44
45 45 /*
46 46 * Inclusion of <sys/signal.h> for sigset_t and stack_t definitions
47 47 * breaks XPG4v2 namespace. Therefore we must duplicate the defines
48 48 * for these types here when _XPG4_2 is defined.
49 49 */
50 50
51 51 #if defined(_XPG4_2) && !defined(__EXTENSIONS__)
52 52 #ifndef _SIGSET_T
53 53 #define _SIGSET_T
54 54 typedef struct { /* signal set type */
55 55 unsigned long __sigbits[4];
56 56 } sigset_t;
57 57 #endif /* _SIGSET_T */
58 58
59 59 #ifndef _STACK_T
60 60 #define _STACK_T
61 61 typedef struct {
62 62 void *ss_sp;
63 63 size_t ss_size;
64 64 int ss_flags;
↓ open down ↓ |
64 lines elided |
↑ open up ↑ |
65 65 } stack_t;
66 66 #endif /* _STACK_T */
67 67 #endif /* defined(_XPG4_2) && !defined(__EXTENSIONS__) */
68 68
69 69 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
70 70 typedef struct ucontext ucontext_t;
71 71 #else
72 72 typedef struct __ucontext ucontext_t;
73 73 #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
74 74
75 +#define XRS_ID 0x00737278 /* the string "xrs" */
76 +
77 +typedef struct {
78 + unsigned long xrs_id;
79 + caddr_t xrs_ptr;
80 +} xrs_t;
81 +
75 82 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
76 83 struct ucontext {
77 84 #else
78 85 struct __ucontext {
79 86 #endif
80 87 unsigned long uc_flags;
81 88 ucontext_t *uc_link;
82 89 sigset_t uc_sigmask;
83 90 stack_t uc_stack;
84 91 mcontext_t uc_mcontext;
85 - long uc_filler[5]; /* see ABI spec for Intel386 */
92 + xrs_t uc_xrs;
93 + long uc_filler[3]; /* see ABI spec for Intel386 */
86 94 };
87 95
88 96 #if defined(_SYSCALL32)
89 97
98 +typedef struct {
99 + uint32_t xrs_id;
100 + caddr32_t xrs_ptr;
101 +} xrs32_t;
102 +
90 103 /* Kernel view of user ILP32 ucontext structure */
91 104
92 105 typedef struct ucontext32 {
93 106 uint32_t uc_flags;
94 107 caddr32_t uc_link;
95 108 sigset_t uc_sigmask;
96 109 stack32_t uc_stack;
97 110 mcontext32_t uc_mcontext;
98 - int32_t uc_filler[5];
111 + xrs32_t uc_xrs;
112 + int32_t uc_filler[3];
99 113 } ucontext32_t;
100 114
101 115 #if defined(_KERNEL)
102 116 extern void ucontext_nto32(const ucontext_t *src, ucontext32_t *dest);
103 117 extern void ucontext_32ton(const ucontext32_t *src, ucontext_t *dest);
104 118 #endif
105 119
106 120 #endif /* _SYSCALL32 */
107 121
108 122 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
109 123 #define GETCONTEXT 0
110 124 #define SETCONTEXT 1
111 125 #define GETUSTACK 2
112 126 #define SETUSTACK 3
113 127
114 128 /*
↓ open down ↓ |
6 lines elided |
↑ open up ↑ |
115 129 * values for uc_flags
116 130 * these are implementation dependent flags, that should be hidden
117 131 * from the user interface, defining which elements of ucontext
118 132 * are valid, and should be restored on call to setcontext
119 133 */
120 134
121 135 #define UC_SIGMASK 0x01
122 136 #define UC_STACK 0x02
123 137 #define UC_CPU 0x04
124 138 #define UC_MAU 0x08
139 +#define UC_XREGS 0x10
125 140 #define UC_FPU UC_MAU
126 141
127 142 #define UC_MCONTEXT (UC_CPU|UC_FPU)
128 143
129 144 /*
130 145 * UC_ALL specifies the default context
131 146 */
132 147
133 148 #define UC_ALL (UC_SIGMASK|UC_STACK|UC_MCONTEXT)
134 149 #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
135 150
136 151 #ifdef _KERNEL
137 152 void savecontext(ucontext_t *, const k_sigset_t *);
138 153 void restorecontext(ucontext_t *);
139 154
140 155 #ifdef _SYSCALL32
141 156 extern void savecontext32(ucontext32_t *, const k_sigset_t *);
142 157 #endif
143 158 #endif
144 159
145 160 #ifdef __cplusplus
146 161 }
147 162 #endif
148 163
149 164 #endif /* _SYS_UCONTEXT_H */
↓ open down ↓ |
15 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX