blob: b05098f7f64ee92a0e7095896607add380990263 [file] [log] [blame]
Markus Armbruster9c93ae12016-06-29 16:09:50 +02001#ifndef MIPS64_TARGET_SIGNAL_H
2#define MIPS64_TARGET_SIGNAL_H
ths540635b2007-09-30 01:58:33 +00003
Laurent Vivierf70c7312018-05-29 21:42:03 +02004#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
ths540635b2007-09-30 01:58:33 +000045/* this struct defines a stack used during syscall handling */
46
47typedef struct target_sigaltstack {
LemonBoyce437482020-11-05 16:52:51 +010048 abi_ulong ss_sp;
49 abi_ulong ss_size;
50 abi_int ss_flags;
Anthony Liguoric227f092009-10-01 16:12:16 -050051} target_stack_t;
ths540635b2007-09-30 01:58:33 +000052
ths540635b2007-09-30 01:58:33 +000053/*
54 * sigaltstack controls
55 */
56#define TARGET_SS_ONSTACK 1
57#define TARGET_SS_DISABLE 2
58
Laurent Vivierf70c7312018-05-29 21:42:03 +020059#define TARGET_SA_NOCLDSTOP 0x00000001
60#define TARGET_SA_NOCLDWAIT 0x00010000
61#define TARGET_SA_SIGINFO 0x00000008
62#define TARGET_SA_ONSTACK 0x08000000
63#define TARGET_SA_NODEFER 0x40000000
64#define TARGET_SA_RESTART 0x10000000
65#define TARGET_SA_RESETHAND 0x80000000
66
ths540635b2007-09-30 01:58:33 +000067#define TARGET_MINSIGSTKSZ 2048
ths540635b2007-09-30 01:58:33 +000068
Chen Gangfba08742020-10-08 12:31:05 +080069/* bit-flags */
70#define TARGET_SS_AUTODISARM (1U << 31) /* disable sas during sighandling */
71/* mask for all SS_xxx flags */
72#define TARGET_SS_FLAG_BITS TARGET_SS_AUTODISARM
73
Philippe Mathieu-Daudéaf552642020-11-19 17:17:07 +010074#if defined(TARGET_ABI_MIPSO32)
75/* compare linux/arch/mips/kernel/signal.c:setup_frame() */
76#define TARGET_ARCH_HAS_SETUP_FRAME
77#endif
Richard Henderson317a33b2021-09-29 09:05:42 -040078#define TARGET_ARCH_HAS_SIGTRAMP_PAGE 1
79
Markus Armbruster9c93ae12016-06-29 16:09:50 +020080#endif /* MIPS64_TARGET_SIGNAL_H */