Markus Armbruster | 9c93ae1 | 2016-06-29 16:09:50 +0200 | [diff] [blame] | 1 | #ifndef MIPS64_TARGET_SIGNAL_H |
| 2 | #define MIPS64_TARGET_SIGNAL_H |
ths | 540635b | 2007-09-30 01:58:33 +0000 | [diff] [blame] | 3 | |
Laurent Vivier | f70c731 | 2018-05-29 21:42:03 +0200 | [diff] [blame] | 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 | |
ths | 540635b | 2007-09-30 01:58:33 +0000 | [diff] [blame] | 45 | /* this struct defines a stack used during syscall handling */ |
| 46 | |
| 47 | typedef struct target_sigaltstack { |
LemonBoy | ce43748 | 2020-11-05 16:52:51 +0100 | [diff] [blame] | 48 | abi_ulong ss_sp; |
| 49 | abi_ulong ss_size; |
| 50 | abi_int ss_flags; |
Anthony Liguori | c227f09 | 2009-10-01 16:12:16 -0500 | [diff] [blame] | 51 | } target_stack_t; |
ths | 540635b | 2007-09-30 01:58:33 +0000 | [diff] [blame] | 52 | |
ths | 540635b | 2007-09-30 01:58:33 +0000 | [diff] [blame] | 53 | /* |
| 54 | * sigaltstack controls |
| 55 | */ |
| 56 | #define TARGET_SS_ONSTACK 1 |
| 57 | #define TARGET_SS_DISABLE 2 |
| 58 | |
Laurent Vivier | f70c731 | 2018-05-29 21:42:03 +0200 | [diff] [blame] | 59 | #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 | |
ths | 540635b | 2007-09-30 01:58:33 +0000 | [diff] [blame] | 67 | #define TARGET_MINSIGSTKSZ 2048 |
ths | 540635b | 2007-09-30 01:58:33 +0000 | [diff] [blame] | 68 | |
Chen Gang | fba0874 | 2020-10-08 12:31:05 +0800 | [diff] [blame] | 69 | /* 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é | af55264 | 2020-11-19 17:17:07 +0100 | [diff] [blame] | 74 | #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 Henderson | 317a33b | 2021-09-29 09:05:42 -0400 | [diff] [blame] | 78 | #define TARGET_ARCH_HAS_SIGTRAMP_PAGE 1 |
| 79 | |
Markus Armbruster | 9c93ae1 | 2016-06-29 16:09:50 +0200 | [diff] [blame] | 80 | #endif /* MIPS64_TARGET_SIGNAL_H */ |