1 /* $NetBSD: linux_signal.h,v 1.8 2007/12/04 18:40:13 dsl Exp $ */
4 * Copyright (c) 1998 The NetBSD Foundation, Inc.
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Eric Haszlakiewicz.
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
33 * Whoever decided how linux would handle
34 * binary compatibility should be shot.
37 #ifndef _ALPHA_LINUX_SIGNAL_H
38 #define _ALPHA_LINUX_SIGNAL_H
40 #define LINUX_SIGHUP 1
41 #define LINUX_SIGINT 2
42 #define LINUX_SIGQUIT 3
43 #define LINUX_SIGILL 4
44 #define LINUX_SIGTRAP 5
45 #define LINUX_SIGABRT 6
46 #define LINUX_SIGEMT 7
47 #define LINUX_SIGFPE 8
48 #define LINUX_SIGKILL 9
49 #define LINUX_SIGBUS 10
50 #define LINUX_SIGSEGV 11
51 #define LINUX_SIGSYS 12
52 #define LINUX_SIGPIPE 13
53 #define LINUX_SIGALRM 14
54 #define LINUX_SIGTERM 15
55 #define LINUX_SIGURG 16
56 #define LINUX_SIGSTOP 17
57 #define LINUX_SIGTSTP 18
58 #define LINUX_SIGCONT 19
59 #define LINUX_SIGCHLD 20
60 #define LINUX_SIGTTIN 21
61 #define LINUX_SIGTTOU 22
62 #define LINUX_SIGIO 23
63 #define LINUX_SIGXCPU 24
64 #define LINUX_SIGXFSZ 25
65 #define LINUX_SIGVTALRM 26
66 #define LINUX_SIGPROF 27
67 #define LINUX_SIGWINCH 28
68 #define LINUX_SIGINFO 29
69 #define LINUX_SIGUSR1 30
70 #define LINUX_SIGUSR2 31
72 #define LINUX_SIGIOT LINUX_SIGABRT
73 #define LINUX_SIGPWR LINUX_SIGINFO
74 #define LINUX_SIGPOLL LINUX_SIGIO
76 /* Min/max real-time linux signal */
77 #define LINUX_SIGRTMIN 32
78 #define LINUX_SIGRTMAX (LINUX__NSIG - 1)
80 #define LINUX__NSIG 64
81 #define LINUX__NSIG_BPW 64
82 #define LINUX__NSIG_WORDS (LINUX__NSIG / LINUX__NSIG_BPW)
85 #define LINUX_MINSIGSTKSZ 4096
88 #define LINUX_SA_ONSTACK 0x00000001
89 #define LINUX_SA_RESTART 0x00000002
90 #define LINUX_SA_NOCLDSTOP 0x00000004
91 #define LINUX_SA_NODEFER 0x00000008
92 #define LINUX_SA_RESETHAND 0x00000010
93 #define LINUX_SA_NOCLDWAIT 0x00000020
94 #define LINUX_SA_SIGINFO 0x00000040
95 #define LINUX_SA_RESTORER 0x04000000
97 #define LINUX_SA_NOMASK LINUX_SA_NODEFER
98 #define LINUX_SA_ONESHOT LINUX_SA_RESETHAND
99 #define LINUX_SA_INTERRUPT 0x20000000 /* Ignore this */
101 #define LINUX_SA_ALLBITS 0x2400007f
103 #define LINUX_SIG_BLOCK 1
104 #define LINUX_SIG_UNBLOCK 2
105 #define LINUX_SIG_SETMASK 3
107 typedef void (*linux_handler_t
)(int);
109 typedef u_long linux_old_sigset_t
;
111 u_long sig
[LINUX__NSIG_WORDS
];
114 /* aka osf_sigaction in Linux sources. Note absence of sa_restorer */
115 struct linux_old_sigaction
{
116 linux_handler_t linux_sa_handler
;
117 linux_old_sigset_t linux_sa_mask
;
121 /* Used in rt_* calls */
122 struct linux_sigaction
{
123 linux_handler_t linux_sa_handler
;
124 u_long linux_sa_flags
;
125 linux_sigset_t linux_sa_mask
;
128 struct linux_k_sigaction
{
129 struct linux_sigaction sa
;
130 void (*k_sa_restorer
)(void);
133 typedef struct linux_sigaltstack
{
139 #endif /* !_ALPHA_LINUX_SIGNAL_H */