1 /*
2 * CDDL HEADER START
3 *
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.
7 *
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.
12 *
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]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 * Copyright 2015, Joyent, Inc.
26 */
27
28 /* Copyright (c) 1988 AT&T */
29 /* All Rights Reserved */
30
31 #include "lint.h"
32 #include <signal.h>
33 #include <siginfo.h>
34
35 #undef _sys_siginfolist
36 #define OLDNSIG 34
37
38 const char *_sys_traplist[NSIGTRAP] = {
39 "breakpoint trap",
40 "trace trap",
41 "read access trap",
42 "write access trap",
43 "execute access trap",
44 "dtrace trap"
45 };
46
47 const char *_sys_illlist[NSIGILL] = {
48 "illegal instruction",
49 "illegal operand",
50 "illegal addressing mode",
51 "illegal trap",
52 "privileged instruction",
53 "privileged register",
54 "co-processor",
55 "bad stack"
56 };
57
58 const char *_sys_fpelist[NSIGFPE] = {
59 "integer divide by zero",
60 "integer overflow",
61 "floating point divide by zero",
62 "floating point overflow",
63 "floating point underflow",
64 "floating point inexact result",
65 "invalid floating point operation",
66 "subscript out of range"
67 };
68
69 const char *_sys_segvlist[NSIGSEGV] = {
70 "address not mapped to object",
71 "invalid permissions"
72 };
73
74 const char *_sys_buslist[NSIGBUS] = {
75 "invalid address alignment",
76 "non-existent physical address",
77 "object specific"
78 };
79
80 const char *_sys_cldlist[NSIGCLD] = {
81 "child has exited",
82 "child was killed",
83 "child has coredumped",
84 "traced child has trapped",
85 "child has stopped",
86 "stopped child has continued"
87 };
88
89 const char *_sys_polllist[NSIGPOLL] = {
90 "input available",
91 "output possible",
92 "message available",
93 "I/O error",
94 "high priority input available",
95 "device disconnected"
96 };
97
98 struct siginfolist _sys_siginfolist[OLDNSIG-1] = {
99 0, 0, /* SIGHUP */
100 0, 0, /* SIGINT */
101 0, 0, /* SIGQUIT */
102 NSIGILL, (char **)_sys_illlist, /* SIGILL */
103 NSIGTRAP, (char **)_sys_traplist, /* SIGTRAP */
104 0, 0, /* SIGABRT */
105 0, 0, /* SIGEMT */
106 NSIGFPE, (char **)_sys_fpelist, /* SIGFPE */
107 0, 0, /* SIGKILL */
108 NSIGBUS, (char **)_sys_buslist, /* SIGBUS */
109 NSIGSEGV, (char **)_sys_segvlist, /* SIGSEGV */
110 0, 0, /* SIGSYS */
111 0, 0, /* SIGPIPE */
112 0, 0, /* SIGALRM */
113 0, 0, /* SIGTERM */
114 0, 0, /* SIGUSR1 */
115 0, 0, /* SIGUSR2 */
116 NSIGCLD, (char **)_sys_cldlist, /* SIGCLD */
117 0, 0, /* SIGPWR */
118 0, 0, /* SIGWINCH */
119 0, 0, /* SIGURG */
120 NSIGPOLL, (char **)_sys_polllist, /* SIGPOLL */
121 0, 0, /* SIGSTOP */
122 0, 0, /* SIGTSTP */
123 0, 0, /* SIGCONT */
124 0, 0, /* SIGTTIN */
125 0, 0, /* SIGTTOU */
126 0, 0, /* SIGVTALRM */
127 0, 0, /* SIGPROF */
128 0, 0, /* SIGXCPU */
129 0, 0, /* SIGXFSZ */
130 0, 0, /* SIGWAITING */
131 0, 0, /* SIGLWP */
132 };
133
134 static const struct siginfolist _sys_siginfolist_data[NSIG-1] = {
135 0, 0, /* SIGHUP */
136 0, 0, /* SIGINT */
137 0, 0, /* SIGQUIT */
138 NSIGILL, (char **)_sys_illlist, /* SIGILL */
139 NSIGTRAP, (char **)_sys_traplist, /* SIGTRAP */
140 0, 0, /* SIGABRT */
141 0, 0, /* SIGEMT */
142 NSIGFPE, (char **)_sys_fpelist, /* SIGFPE */
143 0, 0, /* SIGKILL */
144 NSIGBUS, (char **)_sys_buslist, /* SIGBUS */
145 NSIGSEGV, (char **)_sys_segvlist, /* SIGSEGV */
146 0, 0, /* SIGSYS */
147 0, 0, /* SIGPIPE */
148 0, 0, /* SIGALRM */
149 0, 0, /* SIGTERM */
150 0, 0, /* SIGUSR1 */
151 0, 0, /* SIGUSR2 */
152 NSIGCLD, (char **)_sys_cldlist, /* SIGCLD */
153 0, 0, /* SIGPWR */
154 0, 0, /* SIGWINCH */
155 0, 0, /* SIGURG */
156 NSIGPOLL, (char **)_sys_polllist, /* SIGPOLL */
157 0, 0, /* SIGSTOP */
158 0, 0, /* SIGTSTP */
159 0, 0, /* SIGCONT */
160 0, 0, /* SIGTTIN */
161 0, 0, /* SIGTTOU */
162 0, 0, /* SIGVTALRM */
163 0, 0, /* SIGPROF */
164 0, 0, /* SIGXCPU */
165 0, 0, /* SIGXFSZ */
166 0, 0, /* SIGWAITING */
167 0, 0, /* SIGLWP */
168 0, 0, /* SIGFREEZE */
169 0, 0, /* SIGTHAW */
170 0, 0, /* SIGCANCEL */
171 0, 0, /* SIGLOST */
172 0, 0, /* SIGXRES */
173 0, 0, /* SIGJVM1 */
174 0, 0, /* SIGJVM2 */
175 0, 0, /* SIGINFO */
176 0, 0, /* SIGRTMIN */
177 0, 0, /* SIGRTMIN+1 */
178 0, 0, /* SIGRTMIN+2 */
179 0, 0, /* SIGRTMIN+3 */
180 0, 0,
181 0, 0,
182 0, 0,
183 0, 0,
184 0, 0,
185 0, 0,
186 0, 0,
187 0, 0,
188 0, 0,
189 0, 0,
190 0, 0,
191 0, 0, /* SIGRTMIN+15 */
192 0, 0, /* SIGRTMIN+16 */
193 0, 0, /* SIGRTMAX-15 */
194 0, 0,
195 0, 0,
196 0, 0,
197 0, 0,
198 0, 0,
199 0, 0,
200 0, 0,
201 0, 0,
202 0, 0,
203 0, 0,
204 0, 0,
205 0, 0, /* SIGRTMAX-3 */
206 0, 0, /* SIGRTMAX-2 */
207 0, 0, /* SIGRTMAX-1 */
208 0, 0, /* SIGRTMAX */
209 };
210
211 const struct siginfolist *_sys_siginfolistp = _sys_siginfolist_data;