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