1 #ifndef ALPHA_TARGET_SIGNAL_H
2 #define ALPHA_TARGET_SIGNAL_H
3 
4 #define TARGET_SIGHUP            1
5 #define TARGET_SIGINT            2
6 #define TARGET_SIGQUIT           3
7 #define TARGET_SIGILL            4
8 #define TARGET_SIGTRAP           5
9 #define TARGET_SIGABRT           6
10 #define TARGET_SIGSTKFLT         7 /* actually SIGEMT */
11 #define TARGET_SIGFPE            8
12 #define TARGET_SIGKILL           9
13 #define TARGET_SIGBUS           10
14 #define TARGET_SIGSEGV          11
15 #define TARGET_SIGSYS           12
16 #define TARGET_SIGPIPE          13
17 #define TARGET_SIGALRM          14
18 #define TARGET_SIGTERM          15
19 #define TARGET_SIGURG           16
20 #define TARGET_SIGSTOP          17
21 #define TARGET_SIGTSTP          18
22 #define TARGET_SIGCONT          19
23 #define TARGET_SIGCHLD          20
24 #define TARGET_SIGTTIN          21
25 #define TARGET_SIGTTOU          22
26 #define TARGET_SIGIO            23
27 #define TARGET_SIGXCPU          24
28 #define TARGET_SIGXFSZ          25
29 #define TARGET_SIGVTALRM        26
30 #define TARGET_SIGPROF          27
31 #define TARGET_SIGWINCH         28
32 #define TARGET_SIGPWR           29 /* actually SIGINFO */
33 #define TARGET_SIGUSR1          30
34 #define TARGET_SIGUSR2          31
35 #define TARGET_SIGRTMIN         32
36 
37 #define TARGET_SIG_BLOCK         1
38 #define TARGET_SIG_UNBLOCK       2
39 #define TARGET_SIG_SETMASK       3
40 
41 /* this struct defines a stack used during syscall handling */
42 
43 typedef struct target_sigaltstack {
44     abi_ulong ss_sp;
45     abi_int ss_flags;
46     abi_ulong ss_size;
47 } target_stack_t;
48 
49 
50 /*
51  * sigaltstack controls
52  */
53 #define TARGET_SS_ONSTACK	1
54 #define TARGET_SS_DISABLE	2
55 
56 #define TARGET_SA_ONSTACK       0x00000001
57 #define TARGET_SA_RESTART       0x00000002
58 #define TARGET_SA_NOCLDSTOP     0x00000004
59 #define TARGET_SA_NODEFER       0x00000008
60 #define TARGET_SA_RESETHAND     0x00000010
61 #define TARGET_SA_NOCLDWAIT     0x00000020 /* not supported yet */
62 #define TARGET_SA_SIGINFO       0x00000040
63 
64 #define TARGET_MINSIGSTKSZ	4096
65 #define TARGET_SIGSTKSZ		16384
66 
67 /* From <asm/gentrap.h>.  */
68 #define TARGET_GEN_INTOVF      -1      /* integer overflow */
69 #define TARGET_GEN_INTDIV      -2      /* integer division by zero */
70 #define TARGET_GEN_FLTOVF      -3      /* fp overflow */
71 #define TARGET_GEN_FLTDIV      -4      /* fp division by zero */
72 #define TARGET_GEN_FLTUND      -5      /* fp underflow */
73 #define TARGET_GEN_FLTINV      -6      /* invalid fp operand */
74 #define TARGET_GEN_FLTINE      -7      /* inexact fp operand */
75 #define TARGET_GEN_DECOVF      -8      /* decimal overflow (for COBOL??) */
76 #define TARGET_GEN_DECDIV      -9      /* decimal division by zero */
77 #define TARGET_GEN_DECINV      -10     /* invalid decimal operand */
78 #define TARGET_GEN_ROPRAND     -11     /* reserved operand */
79 #define TARGET_GEN_ASSERTERR   -12     /* assertion error */
80 #define TARGET_GEN_NULPTRERR   -13     /* null pointer error */
81 #define TARGET_GEN_STKOVF      -14     /* stack overflow */
82 #define TARGET_GEN_STRLENERR   -15     /* string length error */
83 #define TARGET_GEN_SUBSTRERR   -16     /* substring error */
84 #define TARGET_GEN_RANGERR     -17     /* range error */
85 #define TARGET_GEN_SUBRNG      -18
86 #define TARGET_GEN_SUBRNG1     -19
87 #define TARGET_GEN_SUBRNG2     -20
88 #define TARGET_GEN_SUBRNG3     -21
89 #define TARGET_GEN_SUBRNG4     -22
90 #define TARGET_GEN_SUBRNG5     -23
91 #define TARGET_GEN_SUBRNG6     -24
92 #define TARGET_GEN_SUBRNG7     -25
93 
94 #define TARGET_ARCH_HAS_SETUP_FRAME
95 #define TARGET_ARCH_HAS_KA_RESTORER
96 
97 /* bit-flags */
98 #define TARGET_SS_AUTODISARM (1U << 31) /* disable sas during sighandling */
99 /* mask for all SS_xxx flags */
100 #define TARGET_SS_FLAG_BITS  TARGET_SS_AUTODISARM
101 
102 #endif /* ALPHA_TARGET_SIGNAL_H */
103