signal.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. #ifndef __ASM_GENERIC_SIGNAL_H
  3. #define __ASM_GENERIC_SIGNAL_H
  4. #include <linux/types.h>
  5. #define _NSIG 64
  6. #define _NSIG_BPW __BITS_PER_LONG
  7. #define _NSIG_WORDS (_NSIG / _NSIG_BPW)
  8. #define SIGHUP 1
  9. #define SIGINT 2
  10. #define SIGQUIT 3
  11. #define SIGILL 4
  12. #define SIGTRAP 5
  13. #define SIGABRT 6
  14. #define SIGIOT 6
  15. #define SIGBUS 7
  16. #define SIGFPE 8
  17. #define SIGKILL 9
  18. #define SIGUSR1 10
  19. #define SIGSEGV 11
  20. #define SIGUSR2 12
  21. #define SIGPIPE 13
  22. #define SIGALRM 14
  23. #define SIGTERM 15
  24. #define SIGSTKFLT 16
  25. #define SIGCHLD 17
  26. #define SIGCONT 18
  27. #define SIGSTOP 19
  28. #define SIGTSTP 20
  29. #define SIGTTIN 21
  30. #define SIGTTOU 22
  31. #define SIGURG 23
  32. #define SIGXCPU 24
  33. #define SIGXFSZ 25
  34. #define SIGVTALRM 26
  35. #define SIGPROF 27
  36. #define SIGWINCH 28
  37. #define SIGIO 29
  38. #define SIGPOLL SIGIO
  39. /*
  40. #define SIGLOST 29
  41. */
  42. #define SIGPWR 30
  43. #define SIGSYS 31
  44. #define SIGUNUSED 31
  45. /* These should not be considered constants from userland. */
  46. #define SIGRTMIN 32
  47. #ifndef SIGRTMAX
  48. #define SIGRTMAX _NSIG
  49. #endif
  50. #if !defined MINSIGSTKSZ || !defined SIGSTKSZ
  51. #define MINSIGSTKSZ 2048
  52. #define SIGSTKSZ 8192
  53. #endif
  54. #ifndef __ASSEMBLY__
  55. typedef struct {
  56. unsigned long sig[_NSIG_WORDS];
  57. } sigset_t;
  58. /* not actually used, but required for linux/syscalls.h */
  59. typedef unsigned long old_sigset_t;
  60. #include <asm-generic/signal-defs.h>
  61. #ifdef SA_RESTORER
  62. #define __ARCH_HAS_SA_RESTORER
  63. #endif
  64. struct sigaction {
  65. __sighandler_t sa_handler;
  66. unsigned long sa_flags;
  67. #ifdef SA_RESTORER
  68. __sigrestore_t sa_restorer;
  69. #endif
  70. sigset_t sa_mask; /* mask last for extensibility */
  71. };
  72. typedef struct sigaltstack {
  73. void *ss_sp;
  74. int ss_flags;
  75. __kernel_size_t ss_size;
  76. } stack_t;
  77. #endif /* __ASSEMBLY__ */
  78. #endif /* __ASM_GENERIC_SIGNAL_H */