1
2 #ifndef _ASMSPARC_SIGNAL_H
3 #define _ASMSPARC_SIGNAL_H
4
5 #include <asm/sigcontext.h>
6
7
8
9
10 #define _NSIG 32
11 #define NSIG _NSIG
12
13 #define SIGHUP 1
14 #define SIGINT 2
15 #define SIGQUIT 3
16 #define SIGILL 4
17 #define SUBSIG_STACK 0
18 #define SUBSIG_ILLINST 2
19 #define SUBSIG_PRIVINST 3
20 #define SUBSIG_BADTRAP(t) (0x80 + (t))
21
22 #define SIGTRAP 5
23 #define SIGABRT 6
24 #define SIGIOT 6
25
26 #define SIGEMT 7
27 #define SUBSIG_TAG 10
28
29 #define SIGFPE 8
30 #define SUBSIG_FPDISABLED 0x400
31 #define SUBSIG_FPERROR 0x404
32 #define SUBSIG_FPINTOVFL 0x001
33 #define SUBSIG_FPSTSIG 0x002
34 #define SUBSIG_IDIVZERO 0x014
35 #define SUBSIG_FPINEXACT 0x0c4
36 #define SUBSIG_FPDIVZERO 0x0c8
37 #define SUBSIG_FPUNFLOW 0x0cc
38 #define SUBSIG_FPOPERROR 0x0d0
39 #define SUBSIG_FPOVFLOW 0x0d4
40
41 #define SIGKILL 9
42 #define SIGBUS 10
43 #define SUBSIG_BUSTIMEOUT 1
44 #define SUBSIG_ALIGNMENT 2
45 #define SUBSIG_MISCERROR 5
46
47 #define SIGSEGV 11
48 #define SUBSIG_NOMAPPING 3
49 #define SUBSIG_PROTECTION 4
50 #define SUBSIG_SEGERROR 5
51
52 #define SIGSYS 12
53 #define SIGPIPE 13
54 #define SIGALRM 14
55 #define SIGTERM 15
56 #define SIGURG 16
57
58
59 #define SIGSTOP 17
60 #define SIGTSTP 18
61 #define SIGCONT 19
62 #define SIGCHLD 20
63 #define SIGTTIN 21
64 #define SIGTTOU 22
65 #define SIGIO 23
66 #define SIGPOLL SIGIO
67 #define SIGXCPU 24
68 #define SIGXFSZ 25
69 #define SIGVTALRM 26
70 #define SIGPROF 27
71 #define SIGWINCH 28
72 #define SIGLOST 29
73 #define SIGUSR1 30
74 #define SIGUSR2 31
75
76 #ifndef __ASSEMBLY__
77
78 typedef unsigned long sigset_t;
79
80 #ifdef __KERNEL__
81 #include <asm/sigcontext.h>
82 #endif
83
84
85 struct sigstack {
86 char *the_stack;
87 int cur_status;
88 };
89
90
91 #define SV_SSTACK 1
92 #define SV_INTR 2
93 #define SV_RESET 4
94 #define SV_IGNCHILD 8
95
96
97
98
99
100
101
102
103
104
105 #define SA_NOCLDSTOP SV_IGNCHILD
106 #define SA_STACK SV_SSTACK
107 #define SA_RESTART SV_INTR
108 #define SA_ONESHOT SV_RESET
109 #define SA_INTERRUPT 0x10
110 #define SA_NOMASK 0x20
111 #define SA_SHIRQ 0x40
112
113 #define SIG_BLOCK 0x01
114 #define SIG_UNBLOCK 0x02
115 #define SIG_SETMASK 0x04
116
117 #ifdef __KERNEL__
118
119
120
121
122
123
124 #define SA_PROBE SA_ONESHOT
125 #define SA_SAMPLE_RANDOM SA_RESTART
126 #endif
127
128
129 typedef void (*__sighandler_t)(int, int, struct sigcontext_struct *, char *);
130
131 #define SIG_DFL ((__sighandler_t)0)
132 #define SIG_IGN ((__sighandler_t)1)
133 #define SIG_ERR ((__sighandler_t)-1)
134
135 struct sigaction {
136 __sighandler_t sa_handler;
137 sigset_t sa_mask;
138 unsigned long sa_flags;
139 };
140
141 #endif
142
143 #endif