xref: /netbsd-src/sys/compat/linux/arch/i386/linux_sigarray.c (revision f7d813f35f702d6c17683ac926f0dd624228c272)
1 /*	$NetBSD: linux_sigarray.c,v 1.20 2002/03/19 20:51:59 christos Exp $	*/
2 
3 /*-
4  * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
5  * All rights reserved.
6  *
7  * This code is derived from software contributed to The NetBSD Foundation
8  * by Frank van der Linden and Eric Haszlakiewicz.
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions
12  * are met:
13  * 1. Redistributions of source code must retain the above copyright
14  *    notice, this list of conditions and the following disclaimer.
15  * 2. Redistributions in binary form must reproduce the above copyright
16  *    notice, this list of conditions and the following disclaimer in the
17  *    documentation and/or other materials provided with the distribution.
18  * 3. All advertising materials mentioning features or use of this software
19  *    must display the following acknowledgement:
20  *	This product includes software developed by the NetBSD
21  *	Foundation, Inc. and its contributors.
22  * 4. Neither the name of The NetBSD Foundation nor the names of its
23  *    contributors may be used to endorse or promote products derived
24  *    from this software without specific prior written permission.
25  *
26  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36  * POSSIBILITY OF SUCH DAMAGE.
37  */
38 
39 #include <sys/cdefs.h>
40 __KERNEL_RCSID(0, "$NetBSD: linux_sigarray.c,v 1.20 2002/03/19 20:51:59 christos Exp $");
41 
42 #include <sys/param.h>
43 #include <sys/systm.h>
44 #include <sys/kernel.h>
45 #include <sys/signal.h>
46 
47 #include <compat/linux/common/linux_signal.h>
48 
49 int const linux_to_native_sig[LINUX__NSIG] = {
50 	0,		/* 0 */
51 	SIGHUP,		/* 1 */
52 	SIGINT,		/* 2 */
53 	SIGQUIT,	/* 3 */
54 	SIGILL,		/* 4 */
55 	SIGTRAP,	/* 5 */
56 	SIGABRT,	/* 6 */
57 	SIGBUS,		/* 7 */
58 	SIGFPE,		/* 8 */
59 	SIGKILL,	/* 9 */
60 	SIGUSR1,	/* 10 */
61 	SIGSEGV,	/* 11 */
62 	SIGUSR2,	/* 12 */
63 	SIGPIPE,	/* 13 */
64 	SIGALRM,	/* 14 */
65 	SIGTERM,	/* 15 */
66 	0,		/* 16 SIGSTKFLT */
67 	SIGCHLD,	/* 17 */
68 	SIGCONT,	/* 18 */
69 	SIGSTOP,	/* 19 */
70 	SIGTSTP,	/* 20 */
71 	SIGTTIN,	/* 21 */
72 	SIGTTOU,	/* 22 */
73 	SIGURG,		/* 23 */
74 	SIGXCPU,	/* 24 */
75 	SIGXFSZ,	/* 25 */
76 	SIGVTALRM,	/* 26 */
77 	SIGPROF,	/* 27 */
78 	SIGWINCH,	/* 28 */
79 	SIGIO,		/* 29 */
80 	SIGPWR,		/* 30 */
81 	SIGSYS,		/* 31 */
82 	SIGRTMIN + 0,	/* 32 */
83 	SIGRTMIN + 1,	/* 33 */
84 	SIGRTMIN + 2,	/* 34 */
85 	SIGRTMIN + 3,	/* 35 */
86 	SIGRTMIN + 4,	/* 36 */
87 	SIGRTMIN + 5,	/* 37 */
88 	SIGRTMIN + 6,	/* 38 */
89 	SIGRTMIN + 7,	/* 39 */
90 	SIGRTMIN + 8,	/* 40 */
91 	SIGRTMIN + 9,	/* 41 */
92 	SIGRTMIN + 10,	/* 42 */
93 	SIGRTMIN + 11,	/* 43 */
94 	SIGRTMIN + 12,	/* 44 */
95 	SIGRTMIN + 13,	/* 45 */
96 	SIGRTMIN + 14,	/* 46 */
97 	SIGRTMIN + 15,	/* 47 */
98 	SIGRTMIN + 16,	/* 48 */
99 	SIGRTMIN + 17,	/* 49 */
100 	SIGRTMIN + 18,	/* 50 */
101 	SIGRTMIN + 19,	/* 51 */
102 	SIGRTMIN + 20,	/* 52 */
103 	SIGRTMIN + 21,	/* 53 */
104 	SIGRTMIN + 22,	/* 54 */
105 	SIGRTMIN + 23,	/* 55 */
106 	SIGRTMIN + 24,	/* 56 */
107 	SIGRTMIN + 25,	/* 57 */
108 	SIGRTMIN + 26,	/* 58 */
109 	SIGRTMIN + 27,	/* 59 */
110 	SIGRTMIN + 28,	/* 60 */
111 	SIGRTMIN + 29,	/* 61 */
112 	SIGRTMIN + 30,	/* 62 */
113 	0		/* 63 */
114 };
115