signal_x86.h 2.0 KB

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