linux_signal.h revision 1.6 1 /* $NetBSD: linux_signal.h,v 1.6 1998/10/01 00:57:30 erh Exp $ */
2
3 /*
4 * Copyright (c) 1998 Eric Haszlakiewicz
5 * Copyright (c) 1995 Frank van der Linden
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 * 3. All advertising materials mentioning features or use of this software
17 * must display the following acknowledgement:
18 * This product includes software developed for the NetBSD Project
19 * by Frank van der Linden
20 * 4. The name of the author may not be used to endorse or promote products
21 * derived from this software without specific prior written permission
22 *
23 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
24 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
25 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
26 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
27 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
28 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
32 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35 /* Note: Machine dependant portions of this file exist. */
36
37 #ifndef _COMMON_LINUX_SIGNAL_H
38 #define _COMMON_LINUX_SIGNAL_H
39
40 #ifdef _KERNEL
41 extern int native_to_linux_sig[];
42 extern int linux_to_native_sig[];
43 __BEGIN_DECLS
44 void linux_old_to_native_sigset __P((const linux_old_sigset_t *, sigset_t *));
45 void native_to_linux_old_sigset __P((const sigset_t *, linux_old_sigset_t *));
46
47 #if 0
48 /* XXX Need these if sizeof(linux_old_sigset_t) != sizeof(linux_sigset_t) */
49 void linux_to_native_sigset __P((const linux_sigset_t *, sigset_t *));
50 void native_to_linux_sigset __P((const sigset_t *, linux_sigset_t *));
51 #endif
52
53 #define linux_to_native_sigset(x,y) \
54 linux_old_to_native_sigset((linux_old_sigset_t *)x, y)
55 #define native_to_linux_sigset(x,y) \
56 native_to_linux_old_sigset(x, (linux_old_sigset_t *)y)
57
58 void linux_old_to_native_sigaction __P((struct linux_old_sigaction *, \
59 struct sigaction *));
60 void native_to_linux_old_sigaction __P((struct sigaction *, \
61 struct linux_old_sigaction *));
62
63 void linux_to_native_sigaction __P((struct linux_sigaction *, \
64 struct sigaction *));
65 void native_to_linux_sigaction __P((struct sigaction *, \
66 struct linux_sigaction *));
67
68 __END_DECLS
69 #endif /* !_KERNEL */
70
71 #endif /* !_COMMON_LINUX_SIGNAL_H */
72