1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 #ifndef __ASM_GENERIC_SIGNAL_DEFS_H 3 #define __ASM_GENERIC_SIGNAL_DEFS_H 4 5 #include <linux/compiler.h> 6 7 /* 8 * SA_FLAGS values: 9 * 10 * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop. 11 * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies. 12 * SA_SIGINFO delivers the signal with SIGINFO structs. 13 * SA_ONSTACK indicates that a registered stack_t will be used. 14 * SA_RESTART flag to get restarting signals (which were the default long ago) 15 * SA_NODEFER prevents the current signal from being masked in the handler. 16 * SA_RESETHAND clears the handler when the signal is delivered. 17 * 18 * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single 19 * Unix names RESETHAND and NODEFER respectively. 20 */ 21 #ifndef SA_NOCLDSTOP 22 #define SA_NOCLDSTOP 0x00000001 23 #endif 24 #ifndef SA_NOCLDWAIT 25 #define SA_NOCLDWAIT 0x00000002 26 #endif 27 #ifndef SA_SIGINFO 28 #define SA_SIGINFO 0x00000004 29 #endif 30 /* 0x00000008 used on alpha, mips, parisc */ 31 /* 0x00000010 used on alpha, parisc */ 32 /* 0x00000020 used on alpha, parisc, sparc */ 33 /* 0x00000040 used on alpha, parisc */ 34 /* 0x00000080 used on parisc */ 35 /* 0x00000100 used on sparc */ 36 /* 0x00000200 used on sparc */ 37 /* 0x00010000 used on mips */ 38 /* 0x01000000 used on x86 */ 39 /* 0x02000000 used on x86 */ 40 /* 41 * New architectures should not define the obsolete 42 * SA_RESTORER 0x04000000 43 */ 44 #ifndef SA_ONSTACK 45 #define SA_ONSTACK 0x08000000 46 #endif 47 #ifndef SA_RESTART 48 #define SA_RESTART 0x10000000 49 #endif 50 #ifndef SA_NODEFER 51 #define SA_NODEFER 0x40000000 52 #endif 53 #ifndef SA_RESETHAND 54 #define SA_RESETHAND 0x80000000 55 #endif 56 57 #define SA_NOMASK SA_NODEFER 58 #define SA_ONESHOT SA_RESETHAND 59 60 #ifndef SIG_BLOCK 61 #define SIG_BLOCK 0 /* for blocking signals */ 62 #endif 63 #ifndef SIG_UNBLOCK 64 #define SIG_UNBLOCK 1 /* for unblocking signals */ 65 #endif 66 #ifndef SIG_SETMASK 67 #define SIG_SETMASK 2 /* for setting the signal mask */ 68 #endif 69 70 #ifndef __ASSEMBLY__ 71 typedef void __signalfn_t(int); 72 typedef __signalfn_t __user *__sighandler_t; 73 74 typedef void __restorefn_t(void); 75 typedef __restorefn_t __user *__sigrestore_t; 76 77 #define SIG_DFL ((__force __sighandler_t)0) /* default signal handling */ 78 #define SIG_IGN ((__force __sighandler_t)1) /* ignore signal */ 79 #define SIG_ERR ((__force __sighandler_t)-1) /* error return from signal */ 80 #endif 81 82 #endif /* __ASM_GENERIC_SIGNAL_DEFS_H */ 83