Merge remote-tracking branch 'remotes/marcandre/tags/rtd-pull-request' into staging
[qemu.git] / linux-user / mips / target_signal.h
1 #ifndef MIPS_TARGET_SIGNAL_H
2 #define MIPS_TARGET_SIGNAL_H
3
4 #define TARGET_SIGHUP 1 /* Hangup (POSIX). */
5 #define TARGET_SIGINT 2 /* Interrupt (ANSI). */
6 #define TARGET_SIGQUIT 3 /* Quit (POSIX). */
7 #define TARGET_SIGILL 4 /* Illegal instruction (ANSI). */
8 #define TARGET_SIGTRAP 5 /* Trace trap (POSIX). */
9 #define TARGET_SIGIOT 6 /* IOT trap (4.2 BSD). */
10 #define TARGET_SIGABRT TARGET_SIGIOT /* Abort (ANSI). */
11 #define TARGET_SIGEMT 7
12 #define TARGET_SIGSTKFLT 7 /* XXX: incorrect */
13 #define TARGET_SIGFPE 8 /* Floating-point exception (ANSI). */
14 #define TARGET_SIGKILL 9 /* Kill, unblockable (POSIX). */
15 #define TARGET_SIGBUS 10 /* BUS error (4.2 BSD). */
16 #define TARGET_SIGSEGV 11 /* Segmentation violation (ANSI). */
17 #define TARGET_SIGSYS 12
18 #define TARGET_SIGPIPE 13 /* Broken pipe (POSIX). */
19 #define TARGET_SIGALRM 14 /* Alarm clock (POSIX). */
20 #define TARGET_SIGTERM 15 /* Termination (ANSI). */
21 #define TARGET_SIGUSR1 16 /* User-defined signal 1 (POSIX). */
22 #define TARGET_SIGUSR2 17 /* User-defined signal 2 (POSIX). */
23 #define TARGET_SIGCHLD 18 /* Child status has changed (POSIX). */
24 #define TARGET_SIGCLD TARGET_SIGCHLD /* Same as TARGET_SIGCHLD (System V). */
25 #define TARGET_SIGPWR 19 /* Power failure restart (System V). */
26 #define TARGET_SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */
27 #define TARGET_SIGURG 21 /* Urgent condition on socket (4.2 BSD). */
28 #define TARGET_SIGIO 22 /* I/O now possible (4.2 BSD). */
29 #define TARGET_SIGPOLL TARGET_SIGIO /* Pollable event occurred (System V). */
30 #define TARGET_SIGSTOP 23 /* Stop, unblockable (POSIX). */
31 #define TARGET_SIGTSTP 24 /* Keyboard stop (POSIX). */
32 #define TARGET_SIGCONT 25 /* Continue (POSIX). */
33 #define TARGET_SIGTTIN 26 /* Background read from tty (POSIX). */
34 #define TARGET_SIGTTOU 27 /* Background write to tty (POSIX). */
35 #define TARGET_SIGVTALRM 28 /* Virtual alarm clock (4.2 BSD). */
36 #define TARGET_SIGPROF 29 /* Profiling alarm clock (4.2 BSD). */
37 #define TARGET_SIGXCPU 30 /* CPU limit exceeded (4.2 BSD). */
38 #define TARGET_SIGXFSZ 31 /* File size limit exceeded (4.2 BSD). */
39 #define TARGET_SIGRTMIN 32
40
41 #define TARGET_SIG_BLOCK 1 /* for blocking signals */
42 #define TARGET_SIG_UNBLOCK 2 /* for unblocking signals */
43 #define TARGET_SIG_SETMASK 3 /* for setting the signal mask */
44
45 /* this struct defines a stack used during syscall handling */
46
47 typedef struct target_sigaltstack {
48 abi_ulong ss_sp;
49 abi_ulong ss_size;
50 abi_int ss_flags;
51 } target_stack_t;
52
53
54 /*
55 * sigaltstack controls
56 */
57 #define TARGET_SS_ONSTACK 1
58 #define TARGET_SS_DISABLE 2
59
60 #define TARGET_SA_NOCLDSTOP 0x00000001
61 #define TARGET_SA_NOCLDWAIT 0x00010000
62 #define TARGET_SA_SIGINFO 0x00000008
63 #define TARGET_SA_ONSTACK 0x08000000
64 #define TARGET_SA_NODEFER 0x40000000
65 #define TARGET_SA_RESTART 0x10000000
66 #define TARGET_SA_RESETHAND 0x80000000
67 #define TARGET_SA_RESTORER 0x04000000 /* Only for O32 */
68
69 #define TARGET_MINSIGSTKSZ 2048
70 #define TARGET_SIGSTKSZ 8192
71
72 #if defined(TARGET_ABI_MIPSO32)
73 /* compare linux/arch/mips/kernel/signal.c:setup_frame() */
74 #define TARGET_ARCH_HAS_SETUP_FRAME
75 #endif
76
77 /* bit-flags */
78 #define TARGET_SS_AUTODISARM (1U << 31) /* disable sas during sighandling */
79 /* mask for all SS_xxx flags */
80 #define TARGET_SS_FLAG_BITS TARGET_SS_AUTODISARM
81
82 #endif /* MIPS_TARGET_SIGNAL_H */