1 #ifndef _ASMSPARC_SIGNAL_H
2 #define _ASMSPARC_SIGNAL_H
4 #include <asm/sigcontext.h>
5 #include <linux/compiler.h>
9 #include <linux/personality.h>
10 #include <linux/types.h>
14 /* On the Sparc the signal handlers get passed a 'sub-signal' code
15 * for certain signal types, which we document here.
21 #define SUBSIG_STACK 0
22 #define SUBSIG_ILLINST 2
23 #define SUBSIG_PRIVINST 3
24 #define SUBSIG_BADTRAP(t) (0x80 + (t))
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
47 #define SUBSIG_BUSTIMEOUT 1
48 #define SUBSIG_ALIGNMENT 2
49 #define SUBSIG_MISCERROR 5
52 #define SUBSIG_NOMAPPING 3
53 #define SUBSIG_PROTECTION 4
54 #define SUBSIG_SEGERROR 5
63 /* SunOS values which deviate from the Linux/i386 ones */
71 #define SIGPOLL SIGIO /* SysV name for SIGIO */
78 #define SIGPWR SIGLOST
82 /* Most things should be clean enough to redefine this at will, if care
83 * is taken to make libc match.
89 #define _NSIG_WORDS (__NEW_NSIG / _NSIG_BPW)
92 #define SIGRTMAX __NEW_NSIG
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
101 #define _NSIG __OLD_NSIG
102 #define __old_sigset_t sigset_t
103 #define __old_sigaction sigaction
108 typedef unsigned long __old_sigset_t
;
111 unsigned long sig
[_NSIG_WORDS
];
116 /* A SunOS sigstack */
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 */
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)
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
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 */
150 * sigaltstack controls
155 #define MINSIGSTKSZ 4096
156 #define SIGSTKSZ 16384
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.
170 #define SA_STATIC_ALLOC 0x8000
173 #include <asm-generic/signal.h>
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
;
184 struct __new_sigaction sa
;
185 void __user
*ka_restorer
;
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 */
195 typedef struct sigaltstack
{
201 #define ptrace_signal_deliver(regs, cookie) do { } while (0)
203 #endif /* !(__KERNEL__) */
205 #endif /* !(__ASSEMBLY__) */
207 #endif /* !(_ASMSPARC_SIGNAL_H) */