linux_signal.h revision 1.13.2.3 1 1.13.2.3 nathanw /* $NetBSD: linux_signal.h,v 1.13.2.3 2002/04/17 00:05:12 nathanw Exp $ */
2 1.7 christos
3 1.7 christos /*-
4 1.8 fvdl * Copyright (c) 1995, 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.8 fvdl * by Frank van der Linden and 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.1 fvdl */
38 1.1 fvdl
39 1.7 christos #ifndef _LINUX_SIGNAL_H
40 1.7 christos #define _LINUX_SIGNAL_H
41 1.1 fvdl
42 1.7 christos #if defined(__i386__)
43 1.7 christos #include <compat/linux/arch/i386/linux_signal.h>
44 1.11 itohy #elif defined(__m68k__)
45 1.11 itohy #include <compat/linux/arch/m68k/linux_signal.h>
46 1.7 christos #elif defined(__alpha__)
47 1.7 christos #include <compat/linux/arch/alpha/linux_signal.h>
48 1.13 manu #elif defined(__powerpc__)
49 1.13 manu #include <compat/linux/arch/powerpc/linux_signal.h>
50 1.13.2.1 nathanw #elif defined(__mips__)
51 1.13.2.1 nathanw #include <compat/linux/arch/mips/linux_signal.h>
52 1.13.2.2 nathanw #elif defined(__arm__)
53 1.13.2.2 nathanw #include <compat/linux/arch/arm/linux_signal.h>
54 1.7 christos #endif
55 1.3 mycroft
56 1.6 erh #ifdef _KERNEL
57 1.13.2.3 nathanw extern const int native_to_linux_signo[];
58 1.13.2.3 nathanw extern const int linux_to_native_signo[];
59 1.6 erh __BEGIN_DECLS
60 1.10 erh int linux_sigprocmask1 __P((struct proc *, int, const linux_old_sigset_t *,
61 1.9 erh linux_old_sigset_t *));
62 1.6 erh
63 1.11 itohy #if LINUX__NSIG_WORDS > 1
64 1.13.2.2 nathanw void linux_old_extra_to_native_sigset __P((sigset_t *,
65 1.13.2.2 nathanw const linux_old_sigset_t *, const unsigned long *));
66 1.13.2.2 nathanw void native_to_linux_old_extra_sigset __P((linux_old_sigset_t *,
67 1.13.2.2 nathanw unsigned long *, const sigset_t *));
68 1.11 itohy #define linux_old_to_native_sigset(x,y) \
69 1.13.2.2 nathanw linux_old_extra_to_native_sigset(x, y, (const unsigned long *)0)
70 1.11 itohy #define native_to_linux_old_sigset(x,y) \
71 1.13.2.2 nathanw native_to_linux_old_extra_sigset(x, (unsigned long *)0, y)
72 1.11 itohy
73 1.11 itohy #else /* LINUX__NSIG_WORDS == 1 */
74 1.11 itohy
75 1.11 itohy #define linux_old_to_native_sigset(x,y) \
76 1.13.2.2 nathanw linux_to_native_sigset(x, (const linux_sigset_t *)y)
77 1.11 itohy #define native_to_linux_old_sigset(x,y) \
78 1.13.2.2 nathanw native_to_linux_sigset((linux_sigset_t *)x, y)
79 1.11 itohy #endif
80 1.11 itohy
81 1.13.2.2 nathanw void linux_to_native_sigset __P((sigset_t *, const linux_sigset_t *));
82 1.13.2.2 nathanw void native_to_linux_sigset __P((linux_sigset_t *, const sigset_t *));
83 1.13.2.2 nathanw int linux_to_native_sigflags __P((const unsigned long));
84 1.13.2.2 nathanw unsigned int native_to_linux_sigflags __P((const int));
85 1.13.2.2 nathanw
86 1.13.2.2 nathanw void linux_old_to_native_sigaction __P((struct sigaction *,
87 1.13.2.2 nathanw const struct linux_old_sigaction *));
88 1.13.2.2 nathanw void native_to_linux_old_sigaction __P((struct linux_old_sigaction *,
89 1.13.2.2 nathanw const struct sigaction *));
90 1.13.2.2 nathanw
91 1.13.2.2 nathanw void linux_to_native_sigaction __P((struct sigaction *,
92 1.13.2.2 nathanw const struct linux_sigaction *));
93 1.13.2.2 nathanw void native_to_linux_sigaction __P((struct linux_sigaction *,
94 1.13.2.2 nathanw const struct sigaction *));
95 1.6 erh
96 1.6 erh __END_DECLS
97 1.6 erh #endif /* !_KERNEL */
98 1.1 fvdl
99 1.7 christos #endif /* !_LINUX_SIGNAL_H */
100