linux_signal.h revision 1.7 1 1.7 christos /* $NetBSD: linux_signal.h,v 1.7 1998/10/03 20:17:43 christos Exp $ */
2 1.7 christos
3 1.7 christos /*-
4 1.7 christos * Copyright (c) 1998 The NetBSD Foundation, Inc.
5 1.7 christos * All rights reserved.
6 1.7 christos *
7 1.7 christos * This code is derived from software contributed to The NetBSD Foundation
8 1.7 christos * by Eric Haszlakiewicz.
9 1.7 christos *
10 1.7 christos * Redistribution and use in source and binary forms, with or without
11 1.7 christos * modification, are permitted provided that the following conditions
12 1.7 christos * are met:
13 1.7 christos * 1. Redistributions of source code must retain the above copyright
14 1.7 christos * notice, this list of conditions and the following disclaimer.
15 1.7 christos * 2. Redistributions in binary form must reproduce the above copyright
16 1.7 christos * notice, this list of conditions and the following disclaimer in the
17 1.7 christos * documentation and/or other materials provided with the distribution.
18 1.7 christos * 3. All advertising materials mentioning features or use of this software
19 1.7 christos * must display the following acknowledgement:
20 1.7 christos * This product includes software developed by the NetBSD
21 1.7 christos * Foundation, Inc. and its contributors.
22 1.7 christos * 4. Neither the name of The NetBSD Foundation nor the names of its
23 1.7 christos * contributors may be used to endorse or promote products derived
24 1.7 christos * from this software without specific prior written permission.
25 1.7 christos *
26 1.7 christos * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27 1.7 christos * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28 1.7 christos * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 1.7 christos * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30 1.7 christos * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 1.7 christos * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 1.7 christos * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 1.7 christos * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 1.7 christos * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 1.7 christos * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 1.7 christos * POSSIBILITY OF SUCH DAMAGE.
37 1.7 christos */
38 1.1 fvdl
39 1.1 fvdl /*
40 1.1 fvdl * Copyright (c) 1995 Frank van der Linden
41 1.1 fvdl * All rights reserved.
42 1.1 fvdl *
43 1.1 fvdl * Redistribution and use in source and binary forms, with or without
44 1.1 fvdl * modification, are permitted provided that the following conditions
45 1.1 fvdl * are met:
46 1.1 fvdl * 1. Redistributions of source code must retain the above copyright
47 1.1 fvdl * notice, this list of conditions and the following disclaimer.
48 1.1 fvdl * 2. Redistributions in binary form must reproduce the above copyright
49 1.1 fvdl * notice, this list of conditions and the following disclaimer in the
50 1.1 fvdl * documentation and/or other materials provided with the distribution.
51 1.1 fvdl * 3. All advertising materials mentioning features or use of this software
52 1.1 fvdl * must display the following acknowledgement:
53 1.1 fvdl * This product includes software developed for the NetBSD Project
54 1.1 fvdl * by Frank van der Linden
55 1.1 fvdl * 4. The name of the author may not be used to endorse or promote products
56 1.1 fvdl * derived from this software without specific prior written permission
57 1.1 fvdl *
58 1.1 fvdl * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
59 1.1 fvdl * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
60 1.1 fvdl * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
61 1.1 fvdl * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
62 1.1 fvdl * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
63 1.1 fvdl * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
64 1.1 fvdl * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
65 1.1 fvdl * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
66 1.1 fvdl * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
67 1.1 fvdl * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
68 1.1 fvdl */
69 1.1 fvdl
70 1.7 christos #ifndef _LINUX_SIGNAL_H
71 1.7 christos #define _LINUX_SIGNAL_H
72 1.1 fvdl
73 1.7 christos #if defined(__i386__)
74 1.7 christos #include <compat/linux/arch/i386/linux_signal.h>
75 1.7 christos #elif defined(__alpha__)
76 1.7 christos #include <compat/linux/arch/alpha/linux_signal.h>
77 1.7 christos #else
78 1.7 christos #error Undefined linux_signal.h machine type.
79 1.7 christos #endif
80 1.3 mycroft
81 1.6 erh #ifdef _KERNEL
82 1.5 mycroft extern int native_to_linux_sig[];
83 1.5 mycroft extern int linux_to_native_sig[];
84 1.6 erh __BEGIN_DECLS
85 1.6 erh void linux_old_to_native_sigset __P((const linux_old_sigset_t *, sigset_t *));
86 1.6 erh void native_to_linux_old_sigset __P((const sigset_t *, linux_old_sigset_t *));
87 1.6 erh
88 1.6 erh #if 0
89 1.6 erh /* XXX Need these if sizeof(linux_old_sigset_t) != sizeof(linux_sigset_t) */
90 1.5 mycroft void linux_to_native_sigset __P((const linux_sigset_t *, sigset_t *));
91 1.5 mycroft void native_to_linux_sigset __P((const sigset_t *, linux_sigset_t *));
92 1.6 erh #endif
93 1.6 erh
94 1.6 erh #define linux_to_native_sigset(x,y) \
95 1.7 christos linux_old_to_native_sigset((linux_old_sigset_t *)x, y)
96 1.6 erh #define native_to_linux_sigset(x,y) \
97 1.7 christos native_to_linux_old_sigset(x, (linux_old_sigset_t *)y)
98 1.6 erh
99 1.7 christos void linux_old_to_native_sigaction __P((struct linux_old_sigaction *,
100 1.7 christos struct sigaction *));
101 1.7 christos void native_to_linux_old_sigaction __P((struct sigaction *,
102 1.7 christos struct linux_old_sigaction *));
103 1.6 erh
104 1.7 christos void linux_to_native_sigaction __P((struct linux_sigaction *,
105 1.7 christos struct sigaction *));
106 1.6 erh void native_to_linux_sigaction __P((struct sigaction *, \
107 1.7 christos struct linux_sigaction *));
108 1.6 erh
109 1.6 erh __END_DECLS
110 1.6 erh #endif /* !_KERNEL */
111 1.1 fvdl
112 1.7 christos #endif /* !_LINUX_SIGNAL_H */
113