16f52b16cSGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 28a1ab315SDavid Howells #ifndef _UAPI__ASM_GENERIC_SIGNAL_H 38a1ab315SDavid Howells #define _UAPI__ASM_GENERIC_SIGNAL_H 48a1ab315SDavid Howells 58a1ab315SDavid Howells #include <linux/types.h> 68a1ab315SDavid Howells 78a1ab315SDavid Howells #define _NSIG 64 88a1ab315SDavid Howells #define _NSIG_BPW __BITS_PER_LONG 98a1ab315SDavid Howells #define _NSIG_WORDS (_NSIG / _NSIG_BPW) 108a1ab315SDavid Howells 118a1ab315SDavid Howells #define SIGHUP 1 128a1ab315SDavid Howells #define SIGINT 2 138a1ab315SDavid Howells #define SIGQUIT 3 148a1ab315SDavid Howells #define SIGILL 4 158a1ab315SDavid Howells #define SIGTRAP 5 168a1ab315SDavid Howells #define SIGABRT 6 178a1ab315SDavid Howells #define SIGIOT 6 188a1ab315SDavid Howells #define SIGBUS 7 198a1ab315SDavid Howells #define SIGFPE 8 208a1ab315SDavid Howells #define SIGKILL 9 218a1ab315SDavid Howells #define SIGUSR1 10 228a1ab315SDavid Howells #define SIGSEGV 11 238a1ab315SDavid Howells #define SIGUSR2 12 248a1ab315SDavid Howells #define SIGPIPE 13 258a1ab315SDavid Howells #define SIGALRM 14 268a1ab315SDavid Howells #define SIGTERM 15 278a1ab315SDavid Howells #define SIGSTKFLT 16 288a1ab315SDavid Howells #define SIGCHLD 17 298a1ab315SDavid Howells #define SIGCONT 18 308a1ab315SDavid Howells #define SIGSTOP 19 318a1ab315SDavid Howells #define SIGTSTP 20 328a1ab315SDavid Howells #define SIGTTIN 21 338a1ab315SDavid Howells #define SIGTTOU 22 348a1ab315SDavid Howells #define SIGURG 23 358a1ab315SDavid Howells #define SIGXCPU 24 368a1ab315SDavid Howells #define SIGXFSZ 25 378a1ab315SDavid Howells #define SIGVTALRM 26 388a1ab315SDavid Howells #define SIGPROF 27 398a1ab315SDavid Howells #define SIGWINCH 28 408a1ab315SDavid Howells #define SIGIO 29 418a1ab315SDavid Howells #define SIGPOLL SIGIO 428a1ab315SDavid Howells /* 438a1ab315SDavid Howells #define SIGLOST 29 448a1ab315SDavid Howells */ 458a1ab315SDavid Howells #define SIGPWR 30 468a1ab315SDavid Howells #define SIGSYS 31 478a1ab315SDavid Howells #define SIGUNUSED 31 488a1ab315SDavid Howells 498a1ab315SDavid Howells /* These should not be considered constants from userland. */ 508a1ab315SDavid Howells #define SIGRTMIN 32 518a1ab315SDavid Howells #ifndef SIGRTMAX 528a1ab315SDavid Howells #define SIGRTMAX _NSIG 538a1ab315SDavid Howells #endif 548a1ab315SDavid Howells 55c9692657SManjeet Pawar #if !defined MINSIGSTKSZ || !defined SIGSTKSZ 568a1ab315SDavid Howells #define MINSIGSTKSZ 2048 578a1ab315SDavid Howells #define SIGSTKSZ 8192 58c9692657SManjeet Pawar #endif 598a1ab315SDavid Howells 608a1ab315SDavid Howells #ifndef __ASSEMBLY__ 618a1ab315SDavid Howells typedef struct { 628a1ab315SDavid Howells unsigned long sig[_NSIG_WORDS]; 638a1ab315SDavid Howells } sigset_t; 648a1ab315SDavid Howells 658a1ab315SDavid Howells /* not actually used, but required for linux/syscalls.h */ 668a1ab315SDavid Howells typedef unsigned long old_sigset_t; 678a1ab315SDavid Howells 688a1ab315SDavid Howells #include <asm-generic/signal-defs.h> 698a1ab315SDavid Howells 70574c4866SAl Viro #ifdef SA_RESTORER 71574c4866SAl Viro #define __ARCH_HAS_SA_RESTORER 72574c4866SAl Viro #endif 73574c4866SAl Viro 74574c4866SAl Viro #ifndef __KERNEL__ 758a1ab315SDavid Howells struct sigaction { 768a1ab315SDavid Howells __sighandler_t sa_handler; 778a1ab315SDavid Howells unsigned long sa_flags; 788a1ab315SDavid Howells #ifdef SA_RESTORER 798a1ab315SDavid Howells __sigrestore_t sa_restorer; 808a1ab315SDavid Howells #endif 818a1ab315SDavid Howells sigset_t sa_mask; /* mask last for extensibility */ 828a1ab315SDavid Howells }; 83574c4866SAl Viro #endif 848a1ab315SDavid Howells 858a1ab315SDavid Howells typedef struct sigaltstack { 868a1ab315SDavid Howells void __user *ss_sp; 878a1ab315SDavid Howells int ss_flags; 88*72113d0aSMasahiro Yamada __kernel_size_t ss_size; 898a1ab315SDavid Howells } stack_t; 908a1ab315SDavid Howells 918a1ab315SDavid Howells #endif /* __ASSEMBLY__ */ 928a1ab315SDavid Howells 938a1ab315SDavid Howells #endif /* _UAPI__ASM_GENERIC_SIGNAL_H */ 94