diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2009-01-02 22:21:06 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-02 22:21:06 -0500 |
commit | ece93487c31607558f4b91f378fcee4b43956dbc (patch) | |
tree | f7b44233473a49b983f51dbf3c9ed56be0fa1b02 /arch | |
parent | 55d646feee9c0ced63f4189aca4ba7c9508b75f9 (diff) |
sparc: unify signal.h
They were almost identical and with the preapration
patch nothing was needed to be added.
The unified version contains a few sparc64 only definitions
but they are kept as is and not protected by ifdef/endif.
The unified version exports a bit more to userspace then the
32 bit version did.
This is not considered fatal.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sparc/include/asm/Kbuild | 2 | ||||
-rw-r--r-- | arch/sparc/include/asm/signal.h | 212 | ||||
-rw-r--r-- | arch/sparc/include/asm/signal_32.h | 207 | ||||
-rw-r--r-- | arch/sparc/include/asm/signal_64.h | 210 |
4 files changed, 207 insertions, 424 deletions
diff --git a/arch/sparc/include/asm/Kbuild b/arch/sparc/include/asm/Kbuild index 42cf48394d7e..fe724d47eb09 100644 --- a/arch/sparc/include/asm/Kbuild +++ b/arch/sparc/include/asm/Kbuild | |||
@@ -9,8 +9,6 @@ header-y += sigcontext_32.h | |||
9 | header-y += sigcontext_64.h | 9 | header-y += sigcontext_64.h |
10 | header-y += siginfo_32.h | 10 | header-y += siginfo_32.h |
11 | header-y += siginfo_64.h | 11 | header-y += siginfo_64.h |
12 | header-y += signal_32.h | ||
13 | header-y += signal_64.h | ||
14 | 12 | ||
15 | header-y += apc.h | 13 | header-y += apc.h |
16 | header-y += asi.h | 14 | header-y += asi.h |
diff --git a/arch/sparc/include/asm/signal.h b/arch/sparc/include/asm/signal.h index 27ab05dc203e..41535e77b255 100644 --- a/arch/sparc/include/asm/signal.h +++ b/arch/sparc/include/asm/signal.h | |||
@@ -1,8 +1,210 @@ | |||
1 | #ifndef ___ASM_SPARC_SIGNAL_H | 1 | #ifndef __SPARC_SIGNAL_H |
2 | #define ___ASM_SPARC_SIGNAL_H | 2 | #define __SPARC_SIGNAL_H |
3 | #if defined(__sparc__) && defined(__arch64__) | 3 | |
4 | #include <asm/signal_64.h> | 4 | #include <asm/sigcontext.h> |
5 | #include <linux/compiler.h> | ||
6 | |||
7 | #ifdef __KERNEL__ | ||
8 | #ifndef __ASSEMBLY__ | ||
9 | #include <linux/personality.h> | ||
10 | #include <linux/types.h> | ||
11 | #endif | ||
12 | #endif | ||
13 | |||
14 | /* On the Sparc the signal handlers get passed a 'sub-signal' code | ||
15 | * for certain signal types, which we document here. | ||
16 | */ | ||
17 | #define SIGHUP 1 | ||
18 | #define SIGINT 2 | ||
19 | #define SIGQUIT 3 | ||
20 | #define SIGILL 4 | ||
21 | #define SUBSIG_STACK 0 | ||
22 | #define SUBSIG_ILLINST 2 | ||
23 | #define SUBSIG_PRIVINST 3 | ||
24 | #define SUBSIG_BADTRAP(t) (0x80 + (t)) | ||
25 | |||
26 | #define SIGTRAP 5 | ||
27 | #define SIGABRT 6 | ||
28 | #define SIGIOT 6 | ||
29 | |||
30 | #define SIGEMT 7 | ||
31 | #define SUBSIG_TAG 10 | ||
32 | |||
33 | #define SIGFPE 8 | ||
34 | #define SUBSIG_FPDISABLED 0x400 | ||
35 | #define SUBSIG_FPERROR 0x404 | ||
36 | #define SUBSIG_FPINTOVFL 0x001 | ||
37 | #define SUBSIG_FPSTSIG 0x002 | ||
38 | #define SUBSIG_IDIVZERO 0x014 | ||
39 | #define SUBSIG_FPINEXACT 0x0c4 | ||
40 | #define SUBSIG_FPDIVZERO 0x0c8 | ||
41 | #define SUBSIG_FPUNFLOW 0x0cc | ||
42 | #define SUBSIG_FPOPERROR 0x0d0 | ||
43 | #define SUBSIG_FPOVFLOW 0x0d4 | ||
44 | |||
45 | #define SIGKILL 9 | ||
46 | #define SIGBUS 10 | ||
47 | #define SUBSIG_BUSTIMEOUT 1 | ||
48 | #define SUBSIG_ALIGNMENT 2 | ||
49 | #define SUBSIG_MISCERROR 5 | ||
50 | |||
51 | #define SIGSEGV 11 | ||
52 | #define SUBSIG_NOMAPPING 3 | ||
53 | #define SUBSIG_PROTECTION 4 | ||
54 | #define SUBSIG_SEGERROR 5 | ||
55 | |||
56 | #define SIGSYS 12 | ||
57 | |||
58 | #define SIGPIPE 13 | ||
59 | #define SIGALRM 14 | ||
60 | #define SIGTERM 15 | ||
61 | #define SIGURG 16 | ||
62 | |||
63 | /* SunOS values which deviate from the Linux/i386 ones */ | ||
64 | #define SIGSTOP 17 | ||
65 | #define SIGTSTP 18 | ||
66 | #define SIGCONT 19 | ||
67 | #define SIGCHLD 20 | ||
68 | #define SIGTTIN 21 | ||
69 | #define SIGTTOU 22 | ||
70 | #define SIGIO 23 | ||
71 | #define SIGPOLL SIGIO /* SysV name for SIGIO */ | ||
72 | #define SIGXCPU 24 | ||
73 | #define SIGXFSZ 25 | ||
74 | #define SIGVTALRM 26 | ||
75 | #define SIGPROF 27 | ||
76 | #define SIGWINCH 28 | ||
77 | #define SIGLOST 29 | ||
78 | #define SIGPWR SIGLOST | ||
79 | #define SIGUSR1 30 | ||
80 | #define SIGUSR2 31 | ||
81 | |||
82 | /* Most things should be clean enough to redefine this at will, if care | ||
83 | is taken to make libc match. */ | ||
84 | |||
85 | #define __OLD_NSIG 32 | ||
86 | #define __NEW_NSIG 64 | ||
87 | #define _NSIG_BPW 64 | ||
88 | #define _NSIG_WORDS (__NEW_NSIG / _NSIG_BPW) | ||
89 | |||
90 | #define SIGRTMIN 32 | ||
91 | #define SIGRTMAX __NEW_NSIG | ||
92 | |||
93 | #if defined(__KERNEL__) || defined(__WANT_POSIX1B_SIGNALS__) | ||
94 | #define _NSIG __NEW_NSIG | ||
95 | #define __new_sigset_t sigset_t | ||
96 | #define __new_sigaction sigaction | ||
97 | #define __new_sigaction32 sigaction32 | ||
98 | #define __old_sigset_t old_sigset_t | ||
99 | #define __old_sigaction old_sigaction | ||
100 | #define __old_sigaction32 old_sigaction32 | ||
5 | #else | 101 | #else |
6 | #include <asm/signal_32.h> | 102 | #define _NSIG __OLD_NSIG |
103 | #define NSIG _NSIG | ||
104 | #define __old_sigset_t sigset_t | ||
105 | #define __old_sigaction sigaction | ||
106 | #define __old_sigaction32 sigaction32 | ||
7 | #endif | 107 | #endif |
108 | |||
109 | #ifndef __ASSEMBLY__ | ||
110 | |||
111 | typedef unsigned long __old_sigset_t; /* at least 32 bits */ | ||
112 | |||
113 | typedef struct { | ||
114 | unsigned long sig[_NSIG_WORDS]; | ||
115 | } __new_sigset_t; | ||
116 | |||
117 | /* A SunOS sigstack */ | ||
118 | struct sigstack { | ||
119 | /* XXX 32-bit pointers pinhead XXX */ | ||
120 | char *the_stack; | ||
121 | int cur_status; | ||
122 | }; | ||
123 | |||
124 | /* Sigvec flags */ | ||
125 | #define _SV_SSTACK 1u /* This signal handler should use sig-stack */ | ||
126 | #define _SV_INTR 2u /* Sig return should not restart system call */ | ||
127 | #define _SV_RESET 4u /* Set handler to SIG_DFL upon taken signal */ | ||
128 | #define _SV_IGNCHILD 8u /* Do not send SIGCHLD */ | ||
129 | |||
130 | /* | ||
131 | * sa_flags values: SA_STACK is not currently supported, but will allow the | ||
132 | * usage of signal stacks by using the (now obsolete) sa_restorer field in | ||
133 | * the sigaction structure as a stack pointer. This is now possible due to | ||
134 | * the changes in signal handling. LBT 010493. | ||
135 | * SA_RESTART flag to get restarting signals (which were the default long ago) | ||
136 | */ | ||
137 | #define SA_NOCLDSTOP _SV_IGNCHILD | ||
138 | #define SA_STACK _SV_SSTACK | ||
139 | #define SA_ONSTACK _SV_SSTACK | ||
140 | #define SA_RESTART _SV_INTR | ||
141 | #define SA_ONESHOT _SV_RESET | ||
142 | #define SA_NOMASK 0x20u | ||
143 | #define SA_NOCLDWAIT 0x100u | ||
144 | #define SA_SIGINFO 0x200u | ||
145 | |||
146 | |||
147 | #define SIG_BLOCK 0x01 /* for blocking signals */ | ||
148 | #define SIG_UNBLOCK 0x02 /* for unblocking signals */ | ||
149 | #define SIG_SETMASK 0x04 /* for setting the signal mask */ | ||
150 | |||
151 | /* | ||
152 | * sigaltstack controls | ||
153 | */ | ||
154 | #define SS_ONSTACK 1 | ||
155 | #define SS_DISABLE 2 | ||
156 | |||
157 | #define MINSIGSTKSZ 4096 | ||
158 | #define SIGSTKSZ 16384 | ||
159 | |||
160 | #ifdef __KERNEL__ | ||
161 | /* | ||
162 | * DJHR | ||
163 | * SA_STATIC_ALLOC is used for the sparc32 system to indicate that this | ||
164 | * interrupt handler's irq structure should be statically allocated | ||
165 | * by the request_irq routine. | ||
166 | * The alternative is that arch/sparc/kernel/irq.c has carnal knowledge | ||
167 | * of interrupt usage and that sucks. Also without a flag like this | ||
168 | * it may be possible for the free_irq routine to attempt to free | ||
169 | * statically allocated data.. which is NOT GOOD. | ||
170 | * | ||
171 | */ | ||
172 | #define SA_STATIC_ALLOC 0x8000 | ||
8 | #endif | 173 | #endif |
174 | |||
175 | #include <asm-generic/signal.h> | ||
176 | |||
177 | struct __new_sigaction { | ||
178 | __sighandler_t sa_handler; | ||
179 | unsigned long sa_flags; | ||
180 | __sigrestore_t sa_restorer; /* not used by Linux/SPARC yet */ | ||
181 | __new_sigset_t sa_mask; | ||
182 | }; | ||
183 | |||
184 | struct __old_sigaction { | ||
185 | __sighandler_t sa_handler; | ||
186 | __old_sigset_t sa_mask; | ||
187 | unsigned long sa_flags; | ||
188 | void (*sa_restorer)(void); /* not used by Linux/SPARC yet */ | ||
189 | }; | ||
190 | |||
191 | typedef struct sigaltstack { | ||
192 | void __user *ss_sp; | ||
193 | int ss_flags; | ||
194 | size_t ss_size; | ||
195 | } stack_t; | ||
196 | |||
197 | #ifdef __KERNEL__ | ||
198 | |||
199 | struct k_sigaction { | ||
200 | struct __new_sigaction sa; | ||
201 | void __user *ka_restorer; | ||
202 | }; | ||
203 | |||
204 | #define ptrace_signal_deliver(regs, cookie) do { } while (0) | ||
205 | |||
206 | #endif /* !(__KERNEL__) */ | ||
207 | |||
208 | #endif /* !(__ASSEMBLY__) */ | ||
209 | |||
210 | #endif /* !(__SPARC_SIGNAL_H) */ | ||
diff --git a/arch/sparc/include/asm/signal_32.h b/arch/sparc/include/asm/signal_32.h deleted file mode 100644 index 96a60ab03ca1..000000000000 --- a/arch/sparc/include/asm/signal_32.h +++ /dev/null | |||
@@ -1,207 +0,0 @@ | |||
1 | #ifndef _ASMSPARC_SIGNAL_H | ||
2 | #define _ASMSPARC_SIGNAL_H | ||
3 | |||
4 | #include <asm/sigcontext.h> | ||
5 | #include <linux/compiler.h> | ||
6 | |||
7 | #ifdef __KERNEL__ | ||
8 | #ifndef __ASSEMBLY__ | ||
9 | #include <linux/personality.h> | ||
10 | #include <linux/types.h> | ||
11 | #endif | ||
12 | #endif | ||
13 | |||
14 | /* On the Sparc the signal handlers get passed a 'sub-signal' code | ||
15 | * for certain signal types, which we document here. | ||
16 | */ | ||
17 | #define SIGHUP 1 | ||
18 | #define SIGINT 2 | ||
19 | #define SIGQUIT 3 | ||
20 | #define SIGILL 4 | ||
21 | #define SUBSIG_STACK 0 | ||
22 | #define SUBSIG_ILLINST 2 | ||
23 | #define SUBSIG_PRIVINST 3 | ||
24 | #define SUBSIG_BADTRAP(t) (0x80 + (t)) | ||
25 | |||
26 | #define SIGTRAP 5 | ||
27 | #define SIGABRT 6 | ||
28 | #define SIGIOT 6 | ||
29 | |||
30 | #define SIGEMT 7 | ||
31 | #define SUBSIG_TAG 10 | ||
32 | |||
33 | #define SIGFPE 8 | ||
34 | #define SUBSIG_FPDISABLED 0x400 | ||
35 | #define SUBSIG_FPERROR 0x404 | ||
36 | #define SUBSIG_FPINTOVFL 0x001 | ||
37 | #define SUBSIG_FPSTSIG 0x002 | ||
38 | #define SUBSIG_IDIVZERO 0x014 | ||
39 | #define SUBSIG_FPINEXACT 0x0c4 | ||
40 | #define SUBSIG_FPDIVZERO 0x0c8 | ||
41 | #define SUBSIG_FPUNFLOW 0x0cc | ||
42 | #define SUBSIG_FPOPERROR 0x0d0 | ||
43 | #define SUBSIG_FPOVFLOW 0x0d4 | ||
44 | |||
45 | #define SIGKILL 9 | ||
46 | #define SIGBUS 10 | ||
47 | #define SUBSIG_BUSTIMEOUT 1 | ||
48 | #define SUBSIG_ALIGNMENT 2 | ||
49 | #define SUBSIG_MISCERROR 5 | ||
50 | |||
51 | #define SIGSEGV 11 | ||
52 | #define SUBSIG_NOMAPPING 3 | ||
53 | #define SUBSIG_PROTECTION 4 | ||
54 | #define SUBSIG_SEGERROR 5 | ||
55 | |||
56 | #define SIGSYS 12 | ||
57 | |||
58 | #define SIGPIPE 13 | ||
59 | #define SIGALRM 14 | ||
60 | #define SIGTERM 15 | ||
61 | #define SIGURG 16 | ||
62 | |||
63 | /* SunOS values which deviate from the Linux/i386 ones */ | ||
64 | #define SIGSTOP 17 | ||
65 | #define SIGTSTP 18 | ||
66 | #define SIGCONT 19 | ||
67 | #define SIGCHLD 20 | ||
68 | #define SIGTTIN 21 | ||
69 | #define SIGTTOU 22 | ||
70 | #define SIGIO 23 | ||
71 | #define SIGPOLL SIGIO /* SysV name for SIGIO */ | ||
72 | #define SIGXCPU 24 | ||
73 | #define SIGXFSZ 25 | ||
74 | #define SIGVTALRM 26 | ||
75 | #define SIGPROF 27 | ||
76 | #define SIGWINCH 28 | ||
77 | #define SIGLOST 29 | ||
78 | #define SIGPWR SIGLOST | ||
79 | #define SIGUSR1 30 | ||
80 | #define SIGUSR2 31 | ||
81 | |||
82 | /* Most things should be clean enough to redefine this at will, if care | ||
83 | * is taken to make libc match. | ||
84 | */ | ||
85 | |||
86 | #define __OLD_NSIG 32 | ||
87 | #define __NEW_NSIG 64 | ||
88 | #define _NSIG_BPW 32 | ||
89 | #define _NSIG_WORDS (__NEW_NSIG / _NSIG_BPW) | ||
90 | |||
91 | #define SIGRTMIN 32 | ||
92 | #define SIGRTMAX __NEW_NSIG | ||
93 | |||
94 | #if defined(__KERNEL__) || defined(__WANT_POSIX1B_SIGNALS__) | ||
95 | #define _NSIG __NEW_NSIG | ||
96 | #define __new_sigset_t sigset_t | ||
97 | #define __new_sigaction sigaction | ||
98 | #define __old_sigset_t old_sigset_t | ||
99 | #define __old_sigaction old_sigaction | ||
100 | #else | ||
101 | #define _NSIG __OLD_NSIG | ||
102 | #define __old_sigset_t sigset_t | ||
103 | #define __old_sigaction sigaction | ||
104 | #endif | ||
105 | |||
106 | #ifndef __ASSEMBLY__ | ||
107 | |||
108 | typedef unsigned long __old_sigset_t; | ||
109 | |||
110 | typedef struct { | ||
111 | unsigned long sig[_NSIG_WORDS]; | ||
112 | } __new_sigset_t; | ||
113 | |||
114 | |||
115 | #ifdef __KERNEL__ | ||
116 | /* A SunOS sigstack */ | ||
117 | struct sigstack { | ||
118 | char *the_stack; | ||
119 | int cur_status; | ||
120 | }; | ||
121 | #endif | ||
122 | |||
123 | /* Sigvec flags */ | ||
124 | #define _SV_SSTACK 1u /* This signal handler should use sig-stack */ | ||
125 | #define _SV_INTR 2u /* Sig return should not restart system call */ | ||
126 | #define _SV_RESET 4u /* Set handler to SIG_DFL upon taken signal */ | ||
127 | #define _SV_IGNCHILD 8u /* Do not send SIGCHLD */ | ||
128 | |||
129 | /* | ||
130 | * sa_flags values: SA_STACK is not currently supported, but will allow the | ||
131 | * usage of signal stacks by using the (now obsolete) sa_restorer field in | ||
132 | * the sigaction structure as a stack pointer. This is now possible due to | ||
133 | * the changes in signal handling. LBT 010493. | ||
134 | * SA_RESTART flag to get restarting signals (which were the default long ago) | ||
135 | */ | ||
136 | #define SA_NOCLDSTOP _SV_IGNCHILD | ||
137 | #define SA_STACK _SV_SSTACK | ||
138 | #define SA_ONSTACK _SV_SSTACK | ||
139 | #define SA_RESTART _SV_INTR | ||
140 | #define SA_ONESHOT _SV_RESET | ||
141 | #define SA_NOMASK 0x20u | ||
142 | #define SA_NOCLDWAIT 0x100u | ||
143 | #define SA_SIGINFO 0x200u | ||
144 | |||
145 | #define SIG_BLOCK 0x01 /* for blocking signals */ | ||
146 | #define SIG_UNBLOCK 0x02 /* for unblocking signals */ | ||
147 | #define SIG_SETMASK 0x04 /* for setting the signal mask */ | ||
148 | |||
149 | /* | ||
150 | * sigaltstack controls | ||
151 | */ | ||
152 | #define SS_ONSTACK 1 | ||
153 | #define SS_DISABLE 2 | ||
154 | |||
155 | #define MINSIGSTKSZ 4096 | ||
156 | #define SIGSTKSZ 16384 | ||
157 | |||
158 | #ifdef __KERNEL__ | ||
159 | /* | ||
160 | * DJHR | ||
161 | * SA_STATIC_ALLOC is used for the SPARC system to indicate that this | ||
162 | * interrupt handler's irq structure should be statically allocated | ||
163 | * by the request_irq routine. | ||
164 | * The alternative is that arch/sparc/kernel/irq.c has carnal knowledge | ||
165 | * of interrupt usage and that sucks. Also without a flag like this | ||
166 | * it may be possible for the free_irq routine to attempt to free | ||
167 | * statically allocated data.. which is NOT GOOD. | ||
168 | * | ||
169 | */ | ||
170 | #define SA_STATIC_ALLOC 0x8000 | ||
171 | #endif | ||
172 | |||
173 | #include <asm-generic/signal.h> | ||
174 | |||
175 | #ifdef __KERNEL__ | ||
176 | struct __new_sigaction { | ||
177 | __sighandler_t sa_handler; | ||
178 | unsigned long sa_flags; | ||
179 | void (*sa_restorer)(void); /* Not used by Linux/SPARC */ | ||
180 | __new_sigset_t sa_mask; | ||
181 | }; | ||
182 | |||
183 | struct k_sigaction { | ||
184 | struct __new_sigaction sa; | ||
185 | void __user *ka_restorer; | ||
186 | }; | ||
187 | |||
188 | struct __old_sigaction { | ||
189 | __sighandler_t sa_handler; | ||
190 | __old_sigset_t sa_mask; | ||
191 | unsigned long sa_flags; | ||
192 | void (*sa_restorer) (void); /* not used by Linux/SPARC */ | ||
193 | }; | ||
194 | |||
195 | typedef struct sigaltstack { | ||
196 | void __user *ss_sp; | ||
197 | int ss_flags; | ||
198 | size_t ss_size; | ||
199 | } stack_t; | ||
200 | |||
201 | #define ptrace_signal_deliver(regs, cookie) do { } while (0) | ||
202 | |||
203 | #endif /* !(__KERNEL__) */ | ||
204 | |||
205 | #endif /* !(__ASSEMBLY__) */ | ||
206 | |||
207 | #endif /* !(_ASMSPARC_SIGNAL_H) */ | ||
diff --git a/arch/sparc/include/asm/signal_64.h b/arch/sparc/include/asm/signal_64.h deleted file mode 100644 index 41535e77b255..000000000000 --- a/arch/sparc/include/asm/signal_64.h +++ /dev/null | |||
@@ -1,210 +0,0 @@ | |||
1 | #ifndef __SPARC_SIGNAL_H | ||
2 | #define __SPARC_SIGNAL_H | ||
3 | |||
4 | #include <asm/sigcontext.h> | ||
5 | #include <linux/compiler.h> | ||
6 | |||
7 | #ifdef __KERNEL__ | ||
8 | #ifndef __ASSEMBLY__ | ||
9 | #include <linux/personality.h> | ||
10 | #include <linux/types.h> | ||
11 | #endif | ||
12 | #endif | ||
13 | |||
14 | /* On the Sparc the signal handlers get passed a 'sub-signal' code | ||
15 | * for certain signal types, which we document here. | ||
16 | */ | ||
17 | #define SIGHUP 1 | ||
18 | #define SIGINT 2 | ||
19 | #define SIGQUIT 3 | ||
20 | #define SIGILL 4 | ||
21 | #define SUBSIG_STACK 0 | ||
22 | #define SUBSIG_ILLINST 2 | ||
23 | #define SUBSIG_PRIVINST 3 | ||
24 | #define SUBSIG_BADTRAP(t) (0x80 + (t)) | ||
25 | |||
26 | #define SIGTRAP 5 | ||
27 | #define SIGABRT 6 | ||
28 | #define SIGIOT 6 | ||
29 | |||
30 | #define SIGEMT 7 | ||
31 | #define SUBSIG_TAG 10 | ||
32 | |||
33 | #define SIGFPE 8 | ||
34 | #define SUBSIG_FPDISABLED 0x400 | ||
35 | #define SUBSIG_FPERROR 0x404 | ||
36 | #define SUBSIG_FPINTOVFL 0x001 | ||
37 | #define SUBSIG_FPSTSIG 0x002 | ||
38 | #define SUBSIG_IDIVZERO 0x014 | ||
39 | #define SUBSIG_FPINEXACT 0x0c4 | ||
40 | #define SUBSIG_FPDIVZERO 0x0c8 | ||
41 | #define SUBSIG_FPUNFLOW 0x0cc | ||
42 | #define SUBSIG_FPOPERROR 0x0d0 | ||
43 | #define SUBSIG_FPOVFLOW 0x0d4 | ||
44 | |||
45 | #define SIGKILL 9 | ||
46 | #define SIGBUS 10 | ||
47 | #define SUBSIG_BUSTIMEOUT 1 | ||
48 | #define SUBSIG_ALIGNMENT 2 | ||
49 | #define SUBSIG_MISCERROR 5 | ||
50 | |||
51 | #define SIGSEGV 11 | ||
52 | #define SUBSIG_NOMAPPING 3 | ||
53 | #define SUBSIG_PROTECTION 4 | ||
54 | #define SUBSIG_SEGERROR 5 | ||
55 | |||
56 | #define SIGSYS 12 | ||
57 | |||
58 | #define SIGPIPE 13 | ||
59 | #define SIGALRM 14 | ||
60 | #define SIGTERM 15 | ||
61 | #define SIGURG 16 | ||
62 | |||
63 | /* SunOS values which deviate from the Linux/i386 ones */ | ||
64 | #define SIGSTOP 17 | ||
65 | #define SIGTSTP 18 | ||
66 | #define SIGCONT 19 | ||
67 | #define SIGCHLD 20 | ||
68 | #define SIGTTIN 21 | ||
69 | #define SIGTTOU 22 | ||
70 | #define SIGIO 23 | ||
71 | #define SIGPOLL SIGIO /* SysV name for SIGIO */ | ||
72 | #define SIGXCPU 24 | ||
73 | #define SIGXFSZ 25 | ||
74 | #define SIGVTALRM 26 | ||
75 | #define SIGPROF 27 | ||
76 | #define SIGWINCH 28 | ||
77 | #define SIGLOST 29 | ||
78 | #define SIGPWR SIGLOST | ||
79 | #define SIGUSR1 30 | ||
80 | #define SIGUSR2 31 | ||
81 | |||
82 | /* Most things should be clean enough to redefine this at will, if care | ||
83 | is taken to make libc match. */ | ||
84 | |||
85 | #define __OLD_NSIG 32 | ||
86 | #define __NEW_NSIG 64 | ||
87 | #define _NSIG_BPW 64 | ||
88 | #define _NSIG_WORDS (__NEW_NSIG / _NSIG_BPW) | ||
89 | |||
90 | #define SIGRTMIN 32 | ||
91 | #define SIGRTMAX __NEW_NSIG | ||
92 | |||
93 | #if defined(__KERNEL__) || defined(__WANT_POSIX1B_SIGNALS__) | ||
94 | #define _NSIG __NEW_NSIG | ||
95 | #define __new_sigset_t sigset_t | ||
96 | #define __new_sigaction sigaction | ||
97 | #define __new_sigaction32 sigaction32 | ||
98 | #define __old_sigset_t old_sigset_t | ||
99 | #define __old_sigaction old_sigaction | ||
100 | #define __old_sigaction32 old_sigaction32 | ||
101 | #else | ||
102 | #define _NSIG __OLD_NSIG | ||
103 | #define NSIG _NSIG | ||
104 | #define __old_sigset_t sigset_t | ||
105 | #define __old_sigaction sigaction | ||
106 | #define __old_sigaction32 sigaction32 | ||
107 | #endif | ||
108 | |||
109 | #ifndef __ASSEMBLY__ | ||
110 | |||
111 | typedef unsigned long __old_sigset_t; /* at least 32 bits */ | ||
112 | |||
113 | typedef struct { | ||
114 | unsigned long sig[_NSIG_WORDS]; | ||
115 | } __new_sigset_t; | ||
116 | |||
117 | /* A SunOS sigstack */ | ||
118 | struct sigstack { | ||
119 | /* XXX 32-bit pointers pinhead XXX */ | ||
120 | char *the_stack; | ||
121 | int cur_status; | ||
122 | }; | ||
123 | |||
124 | /* Sigvec flags */ | ||
125 | #define _SV_SSTACK 1u /* This signal handler should use sig-stack */ | ||
126 | #define _SV_INTR 2u /* Sig return should not restart system call */ | ||
127 | #define _SV_RESET 4u /* Set handler to SIG_DFL upon taken signal */ | ||
128 | #define _SV_IGNCHILD 8u /* Do not send SIGCHLD */ | ||
129 | |||
130 | /* | ||
131 | * sa_flags values: SA_STACK is not currently supported, but will allow the | ||
132 | * usage of signal stacks by using the (now obsolete) sa_restorer field in | ||
133 | * the sigaction structure as a stack pointer. This is now possible due to | ||
134 | * the changes in signal handling. LBT 010493. | ||
135 | * SA_RESTART flag to get restarting signals (which were the default long ago) | ||
136 | */ | ||
137 | #define SA_NOCLDSTOP _SV_IGNCHILD | ||
138 | #define SA_STACK _SV_SSTACK | ||
139 | #define SA_ONSTACK _SV_SSTACK | ||
140 | #define SA_RESTART _SV_INTR | ||
141 | #define SA_ONESHOT _SV_RESET | ||
142 | #define SA_NOMASK 0x20u | ||
143 | #define SA_NOCLDWAIT 0x100u | ||
144 | #define SA_SIGINFO 0x200u | ||
145 | |||
146 | |||
147 | #define SIG_BLOCK 0x01 /* for blocking signals */ | ||
148 | #define SIG_UNBLOCK 0x02 /* for unblocking signals */ | ||
149 | #define SIG_SETMASK 0x04 /* for setting the signal mask */ | ||
150 | |||
151 | /* | ||
152 | * sigaltstack controls | ||
153 | */ | ||
154 | #define SS_ONSTACK 1 | ||
155 | #define SS_DISABLE 2 | ||
156 | |||
157 | #define MINSIGSTKSZ 4096 | ||
158 | #define SIGSTKSZ 16384 | ||
159 | |||
160 | #ifdef __KERNEL__ | ||
161 | /* | ||
162 | * DJHR | ||
163 | * SA_STATIC_ALLOC is used for the sparc32 system to indicate that this | ||
164 | * interrupt handler's irq structure should be statically allocated | ||
165 | * by the request_irq routine. | ||
166 | * The alternative is that arch/sparc/kernel/irq.c has carnal knowledge | ||
167 | * of interrupt usage and that sucks. Also without a flag like this | ||
168 | * it may be possible for the free_irq routine to attempt to free | ||
169 | * statically allocated data.. which is NOT GOOD. | ||
170 | * | ||
171 | */ | ||
172 | #define SA_STATIC_ALLOC 0x8000 | ||
173 | #endif | ||
174 | |||
175 | #include <asm-generic/signal.h> | ||
176 | |||
177 | struct __new_sigaction { | ||
178 | __sighandler_t sa_handler; | ||
179 | unsigned long sa_flags; | ||
180 | __sigrestore_t sa_restorer; /* not used by Linux/SPARC yet */ | ||
181 | __new_sigset_t sa_mask; | ||
182 | }; | ||
183 | |||
184 | struct __old_sigaction { | ||
185 | __sighandler_t sa_handler; | ||
186 | __old_sigset_t sa_mask; | ||
187 | unsigned long sa_flags; | ||
188 | void (*sa_restorer)(void); /* not used by Linux/SPARC yet */ | ||
189 | }; | ||
190 | |||
191 | typedef struct sigaltstack { | ||
192 | void __user *ss_sp; | ||
193 | int ss_flags; | ||
194 | size_t ss_size; | ||
195 | } stack_t; | ||
196 | |||
197 | #ifdef __KERNEL__ | ||
198 | |||
199 | struct k_sigaction { | ||
200 | struct __new_sigaction sa; | ||
201 | void __user *ka_restorer; | ||
202 | }; | ||
203 | |||
204 | #define ptrace_signal_deliver(regs, cookie) do { } while (0) | ||
205 | |||
206 | #endif /* !(__KERNEL__) */ | ||
207 | |||
208 | #endif /* !(__ASSEMBLY__) */ | ||
209 | |||
210 | #endif /* !(__SPARC_SIGNAL_H) */ | ||