linux_signal.h revision 1.3.4.2 1 1.3.4.2 thorpej /* $NetBSD: linux_signal.h,v 1.3.4.2 2001/09/13 01:15:20 thorpej Exp $ */
2 1.3.4.2 thorpej
3 1.3.4.2 thorpej /*-
4 1.3.4.2 thorpej * Copyright (c) 1995, 1998, 2001 The NetBSD Foundation, Inc.
5 1.3.4.2 thorpej * All rights reserved.
6 1.3.4.2 thorpej *
7 1.3.4.2 thorpej * This code is derived from software contributed to The NetBSD Foundation
8 1.3.4.2 thorpej * by Frank van der Linden, Eric Haszlakiewicz and Emmanuel Dreyfus.
9 1.3.4.2 thorpej *
10 1.3.4.2 thorpej * Redistribution and use in source and binary forms, with or without
11 1.3.4.2 thorpej * modification, are permitted provided that the following conditions
12 1.3.4.2 thorpej * are met:
13 1.3.4.2 thorpej * 1. Redistributions of source code must retain the above copyright
14 1.3.4.2 thorpej * notice, this list of conditions and the following disclaimer.
15 1.3.4.2 thorpej * 2. Redistributions in binary form must reproduce the above copyright
16 1.3.4.2 thorpej * notice, this list of conditions and the following disclaimer in the
17 1.3.4.2 thorpej * documentation and/or other materials provided with the distribution.
18 1.3.4.2 thorpej * 3. All advertising materials mentioning features or use of this software
19 1.3.4.2 thorpej * must display the following acknowledgement:
20 1.3.4.2 thorpej * This product includes software developed by the NetBSD
21 1.3.4.2 thorpej * Foundation, Inc. and its contributors.
22 1.3.4.2 thorpej * 4. Neither the name of The NetBSD Foundation nor the names of its
23 1.3.4.2 thorpej * contributors may be used to endorse or promote products derived
24 1.3.4.2 thorpej * from this software without specific prior written permission.
25 1.3.4.2 thorpej *
26 1.3.4.2 thorpej * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
27 1.3.4.2 thorpej * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
28 1.3.4.2 thorpej * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29 1.3.4.2 thorpej * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
30 1.3.4.2 thorpej * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
31 1.3.4.2 thorpej * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
32 1.3.4.2 thorpej * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
33 1.3.4.2 thorpej * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
34 1.3.4.2 thorpej * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35 1.3.4.2 thorpej * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36 1.3.4.2 thorpej * POSSIBILITY OF SUCH DAMAGE.
37 1.3.4.2 thorpej */
38 1.3.4.2 thorpej
39 1.3.4.2 thorpej #ifndef _MIPS_LINUX_SIGNAL_H
40 1.3.4.2 thorpej #define _MIPS_LINUX_SIGNAL_H
41 1.3.4.2 thorpej
42 1.3.4.2 thorpej /*
43 1.3.4.2 thorpej * Everything is from Linux's include/asm-mips/signal.h
44 1.3.4.2 thorpej */
45 1.3.4.2 thorpej #define LINUX_SIGHUP 1
46 1.3.4.2 thorpej #define LINUX_SIGINT 2
47 1.3.4.2 thorpej #define LINUX_SIGQUIT 3
48 1.3.4.2 thorpej #define LINUX_SIGILL 4
49 1.3.4.2 thorpej #define LINUX_SIGTRAP 5
50 1.3.4.2 thorpej #define LINUX_SIGABRT 6
51 1.3.4.2 thorpej #define LINUX_SIGIOT 6
52 1.3.4.2 thorpej #define LINUX_SIGEMT 7
53 1.3.4.2 thorpej #define LINUX_SIGFPE 8
54 1.3.4.2 thorpej #define LINUX_SIGKILL 9
55 1.3.4.2 thorpej #define LINUX_SIGBUS 10
56 1.3.4.2 thorpej #define LINUX_SIGSEGV 11
57 1.3.4.2 thorpej #define LINUX_SIGSYS 12
58 1.3.4.2 thorpej #define LINUX_SIGPIPE 13
59 1.3.4.2 thorpej #define LINUX_SIGALRM 14
60 1.3.4.2 thorpej #define LINUX_SIGTERM 15
61 1.3.4.2 thorpej #define LINUX_SIGUSR1 16
62 1.3.4.2 thorpej #define LINUX_SIGUSR2 17
63 1.3.4.2 thorpej #define LINUX_SIGCHLD 18
64 1.3.4.2 thorpej #define LINUX_SIGCLD 18
65 1.3.4.2 thorpej #define LINUX_SIGPWR 19
66 1.3.4.2 thorpej #define LINUX_SIGWINCH 20
67 1.3.4.2 thorpej #define LINUX_SIGURG 21
68 1.3.4.2 thorpej #define LINUX_SIGIO 22
69 1.3.4.2 thorpej #define LINUX_SIGPOLL 22
70 1.3.4.2 thorpej #define LINUX_SIGSTOP 23
71 1.3.4.2 thorpej #define LINUX_SIGTSTP 24
72 1.3.4.2 thorpej #define LINUX_SIGCONT 25
73 1.3.4.2 thorpej #define LINUX_SIGTTIN 26
74 1.3.4.2 thorpej #define LINUX_SIGTTOU 27
75 1.3.4.2 thorpej #define LINUX_SIGVTALRM 28
76 1.3.4.2 thorpej #define LINUX_SIGPROF 29
77 1.3.4.2 thorpej #define LINUX_SIGXCPU 30
78 1.3.4.2 thorpej #define LINUX_SIGXFSZ 31
79 1.3.4.2 thorpej
80 1.3.4.2 thorpej #define LINUX_SIGRTMIN 32
81 1.3.4.2 thorpej
82 1.3.4.2 thorpej #define LINUX__NSIG 128
83 1.3.4.2 thorpej #if defined(ELFSIZE) && (ELFSIZE == 64)
84 1.3.4.2 thorpej #define LINUX__NSIG_BPW 64
85 1.3.4.2 thorpej #else
86 1.3.4.2 thorpej #define LINUX__NSIG_BPW 32
87 1.3.4.2 thorpej #endif
88 1.3.4.2 thorpej #define LINUX__NSIG_WORDS (LINUX__NSIG / LINUX__NSIG_BPW)
89 1.3.4.2 thorpej
90 1.3.4.2 thorpej #define LINUX_SIG_BLOCK 1
91 1.3.4.2 thorpej #define LINUX_SIG_UNBLOCK 2
92 1.3.4.2 thorpej #define LINUX_SIG_SETMASK 3
93 1.3.4.2 thorpej
94 1.3.4.2 thorpej /* sa_flags */
95 1.3.4.2 thorpej #define LINUX_SA_NOCLDSTOP 0x00000001
96 1.3.4.2 thorpej #define LINUX_SA_SIGINFO 0x00000008
97 1.3.4.2 thorpej #define LINUX_SA_ONSTACK 0x08000000
98 1.3.4.2 thorpej #define LINUX_SA_RESTART 0x10000000
99 1.3.4.2 thorpej #define LINUX_SA_INTERRUPT 0x20000000
100 1.3.4.2 thorpej #define LINUX_SA_NODEFER 0x40000000
101 1.3.4.2 thorpej #define LINUX_SA_RESETHAND 0x80000000
102 1.3.4.2 thorpej #define LINUX_SA_NOMASK LINUX_SA_NODEFER
103 1.3.4.2 thorpej #define LINUX_SA_ONESHOT LINUX_SA_RESETHAND
104 1.3.4.2 thorpej #define LINUX_SA_ALLBITS 0xf8000001 /* XXX from i386, not in mips. */
105 1.3.4.2 thorpej
106 1.3.4.2 thorpej typedef void (*linux___sighandler_t) __P((int));
107 1.3.4.2 thorpej
108 1.3.4.2 thorpej typedef unsigned long linux_old_sigset_t;
109 1.3.4.2 thorpej typedef struct {
110 1.3.4.2 thorpej unsigned long sig[LINUX__NSIG_WORDS];
111 1.3.4.2 thorpej } linux_sigset_t;
112 1.3.4.2 thorpej
113 1.3.4.2 thorpej /* Used in rt_* calls. No old_sigaction is defined for MIPS */
114 1.3.4.2 thorpej struct linux_sigaction {
115 1.3.4.2 thorpej unsigned int sa_flags;
116 1.3.4.2 thorpej linux___sighandler_t sa_handler;
117 1.3.4.2 thorpej linux_sigset_t sa_mask;
118 1.3.4.2 thorpej void (*sa_restorer) __P((void));
119 1.3.4.2 thorpej int sa_resv[1];
120 1.3.4.2 thorpej };
121 1.3.4.2 thorpej
122 1.3.4.2 thorpej struct linux_k_sigaction {
123 1.3.4.2 thorpej struct linux_sigaction sa;
124 1.3.4.2 thorpej };
125 1.3.4.2 thorpej
126 1.3.4.2 thorpej #define LINUX_SS_ONSTACK 1
127 1.3.4.2 thorpej #define LINUX_SS_DISABLE 2
128 1.3.4.2 thorpej
129 1.3.4.2 thorpej #define LINUX_MINSIGSTKSZ 2048
130 1.3.4.2 thorpej #define LINUX_SIGSTKSZ 8192
131 1.3.4.2 thorpej
132 1.3.4.2 thorpej struct linux_sigaltstack {
133 1.3.4.2 thorpej void *ss_sp;
134 1.3.4.2 thorpej size_t ss_size;
135 1.3.4.2 thorpej int ss_flags;
136 1.3.4.2 thorpej };
137 1.3.4.2 thorpej typedef struct linux_sigaltstack linux_stack_t; /* XXX really needed ? */
138 1.3.4.2 thorpej
139 1.3.4.2 thorpej #endif /* !_MIPS_LINUX_SIGNAL_H */
140