signal.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. #ifndef _UAPI_ASM_X86_SIGNAL_H
  3. #define _UAPI_ASM_X86_SIGNAL_H
  4. #ifndef __ASSEMBLY__
  5. #include <linux/types.h>
  6. #include <linux/time.h>
  7. #include <linux/compiler.h>
  8. /* Avoid too many header ordering problems. */
  9. struct siginfo;
  10. #ifndef __KERNEL__
  11. /* Here we must cater to libcs that poke about in kernel headers. */
  12. #define NSIG 32
  13. typedef unsigned long sigset_t;
  14. #endif /* __KERNEL__ */
  15. #endif /* __ASSEMBLY__ */
  16. #define SIGHUP 1
  17. #define SIGINT 2
  18. #define SIGQUIT 3
  19. #define SIGILL 4
  20. #define SIGTRAP 5
  21. #define SIGABRT 6
  22. #define SIGIOT 6
  23. #define SIGBUS 7
  24. #define SIGFPE 8
  25. #define SIGKILL 9
  26. #define SIGUSR1 10
  27. #define SIGSEGV 11
  28. #define SIGUSR2 12
  29. #define SIGPIPE 13
  30. #define SIGALRM 14
  31. #define SIGTERM 15
  32. #define SIGSTKFLT 16
  33. #define SIGCHLD 17
  34. #define SIGCONT 18
  35. #define SIGSTOP 19
  36. #define SIGTSTP 20
  37. #define SIGTTIN 21
  38. #define SIGTTOU 22
  39. #define SIGURG 23
  40. #define SIGXCPU 24
  41. #define SIGXFSZ 25
  42. #define SIGVTALRM 26
  43. #define SIGPROF 27
  44. #define SIGWINCH 28
  45. #define SIGIO 29
  46. #define SIGPOLL SIGIO
  47. /*
  48. #define SIGLOST 29
  49. */
  50. #define SIGPWR 30
  51. #define SIGSYS 31
  52. #define SIGUNUSED 31
  53. /* These should not be considered constants from userland. */
  54. #define SIGRTMIN 32
  55. #define SIGRTMAX _NSIG
  56. #define SA_RESTORER 0x04000000
  57. #define MINSIGSTKSZ 2048
  58. #define SIGSTKSZ 8192
  59. #include <asm-generic/signal-defs.h>
  60. #ifndef __ASSEMBLY__
  61. # ifndef __KERNEL__
  62. /* Here we must cater to libcs that poke about in kernel headers. */
  63. #ifdef __i386__
  64. struct sigaction {
  65. union {
  66. __sighandler_t _sa_handler;
  67. void (*_sa_sigaction)(int, struct siginfo *, void *);
  68. } _u;
  69. sigset_t sa_mask;
  70. unsigned long sa_flags;
  71. void (*sa_restorer)(void);
  72. };
  73. #define sa_handler _u._sa_handler
  74. #define sa_sigaction _u._sa_sigaction
  75. #else /* __i386__ */
  76. struct sigaction {
  77. __sighandler_t sa_handler;
  78. unsigned long sa_flags;
  79. __sigrestore_t sa_restorer;
  80. sigset_t sa_mask; /* mask last for extensibility */
  81. };
  82. #endif /* !__i386__ */
  83. # endif /* ! __KERNEL__ */
  84. typedef struct sigaltstack {
  85. void __user *ss_sp;
  86. int ss_flags;
  87. __kernel_size_t ss_size;
  88. } stack_t;
  89. #endif /* __ASSEMBLY__ */
  90. #endif /* _UAPI_ASM_X86_SIGNAL_H */