1 /* $NetBSD: linux_signo.c,v 1.3 2002/04/03 17:18:21 christos Exp $ */
2 /*-
3 * Copyright (c) 1995, 1998 The NetBSD Foundation, Inc.
4 * All rights reserved.
5 *
6 * This code is derived from software contributed to The NetBSD Foundation
7 * by Frank van der Linden and Eric Haszlakiewicz.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
11 * are met:
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright
15 * notice, this list of conditions and the following disclaimer in the
16 * documentation and/or other materials provided with the distribution.
17 * 3. All advertising materials mentioning features or use of this software
18 * must display the following acknowledgement:
19 * This product includes software developed by the NetBSD
20 * Foundation, Inc. and its contributors.
21 * 4. Neither the name of The NetBSD Foundation nor the names of its
22 * contributors may be used to endorse or promote products derived
23 * from this software without specific prior written permission.
24 *
25 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
26 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
27 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
29 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 * POSSIBILITY OF SUCH DAMAGE.
36 */
37
38 #include <sys/cdefs.h>
39 __KERNEL_RCSID(0, "$NetBSD: linux_signo.c,v 1.3 2002/04/03 17:18:21 christos Exp $");
40
41 #include <sys/types.h>
42 #include <sys/signal.h>
43
44 #include <compat/linux/common/linux_types.h>
45 #include <compat/linux/common/linux_signal.h>
46
47 #ifndef LINUX_SIGINFO
48 #define LINUX_SIGINFO 0
49 #endif
50
51 #ifndef LINUX_SIGEMT
52 #define LINUX_SIGEMT 0
53 #endif
54
55 /* Note: linux_to_native_signo[] is in <arch>/linux_sigarray.c */
56 #ifdef LINUX_SIGHUP
57 const int native_to_linux_signo[] = {
58 0, /* 0 */
59 LINUX_SIGHUP, /* 1 */
60 LINUX_SIGINT, /* 2 */
61 LINUX_SIGQUIT, /* 3 */
62 LINUX_SIGILL, /* 4 */
63 LINUX_SIGTRAP, /* 5 */
64 LINUX_SIGABRT, /* 6 */
65 LINUX_SIGEMT, /* 7 */
66 LINUX_SIGFPE, /* 8 */
67 LINUX_SIGKILL, /* 9 */
68 LINUX_SIGBUS, /* 10 */
69 LINUX_SIGSEGV, /* 11 */
70 LINUX_SIGSYS, /* 12 */
71 LINUX_SIGPIPE, /* 13 */
72 LINUX_SIGALRM, /* 14 */
73 LINUX_SIGTERM, /* 15 */
74 LINUX_SIGURG, /* 16 */
75 LINUX_SIGSTOP, /* 17 */
76 LINUX_SIGTSTP, /* 18 */
77 LINUX_SIGCONT, /* 19 */
78 LINUX_SIGCHLD, /* 20 */
79 LINUX_SIGTTIN, /* 21 */
80 LINUX_SIGTTOU, /* 22 */
81 LINUX_SIGIO, /* 23 */
82 LINUX_SIGXCPU, /* 24 */
83 LINUX_SIGXFSZ, /* 25 */
84 LINUX_SIGVTALRM, /* 26 */
85 LINUX_SIGPROF, /* 27 */
86 LINUX_SIGWINCH, /* 28 */
87 LINUX_SIGINFO, /* 29 */
88 LINUX_SIGUSR1, /* 30 */
89 LINUX_SIGUSR2, /* 31 */
90 LINUX_SIGPWR, /* 32 */
91 LINUX_SIGRTMIN + 0, /* 33 */
92 LINUX_SIGRTMIN + 1, /* 34 */
93 LINUX_SIGRTMIN + 2, /* 35 */
94 LINUX_SIGRTMIN + 3, /* 36 */
95 LINUX_SIGRTMIN + 4, /* 37 */
96 LINUX_SIGRTMIN + 5, /* 38 */
97 LINUX_SIGRTMIN + 6, /* 39 */
98 LINUX_SIGRTMIN + 7, /* 40 */
99 LINUX_SIGRTMIN + 8, /* 41 */
100 LINUX_SIGRTMIN + 9, /* 42 */
101 LINUX_SIGRTMIN + 10, /* 43 */
102 LINUX_SIGRTMIN + 11, /* 44 */
103 LINUX_SIGRTMIN + 12, /* 45 */
104 LINUX_SIGRTMIN + 13, /* 46 */
105 LINUX_SIGRTMIN + 14, /* 47 */
106 LINUX_SIGRTMIN + 15, /* 48 */
107 LINUX_SIGRTMIN + 16, /* 49 */
108 LINUX_SIGRTMIN + 17, /* 50 */
109 LINUX_SIGRTMIN + 18, /* 51 */
110 LINUX_SIGRTMIN + 19, /* 52 */
111 LINUX_SIGRTMIN + 20, /* 53 */
112 LINUX_SIGRTMIN + 21, /* 54 */
113 LINUX_SIGRTMIN + 22, /* 55 */
114 LINUX_SIGRTMIN + 23, /* 56 */
115 LINUX_SIGRTMIN + 24, /* 57 */
116 LINUX_SIGRTMIN + 25, /* 58 */
117 LINUX_SIGRTMIN + 26, /* 59 */
118 LINUX_SIGRTMIN + 27, /* 60 */
119 LINUX_SIGRTMIN + 28, /* 61 */
120 LINUX_SIGRTMIN + 29, /* 62 */
121 LINUX_SIGRTMIN + 30, /* 63 */
122 };
123 #else
124 const int native_to_linux_signo[NSIG];
125 #endif
126
127 #if defined(__i386__)
128 #include <compat/linux/arch/i386/linux_sigarray.c>
129 #elif defined(__m68k__)
130 #include <compat/linux/arch/m68k/linux_sigarray.c>
131 #elif defined(__alpha__)
132 #include <compat/linux/arch/alpha/linux_sigarray.c>
133 #elif defined(__powerpc__)
134 #include <compat/linux/arch/powerpc/linux_sigarray.c>
135 #elif defined(__mips__)
136 #include <compat/linux/arch/mips/linux_sigarray.c>
137 #elif defined(__arm__)
138 #include <compat/linux/arch/arm/linux_sigarray.c>
139 #else
140 const int linux_to_native_signo[NSIG];
141 #endif
Cache object: e789162162fff737ed5ea666bc018242
|