signal.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. #ifndef _UAPI_ASMAXP_SIGNAL_H
  3. #define _UAPI_ASMAXP_SIGNAL_H
  4. #include <linux/types.h>
  5. /* Avoid too many header ordering problems. */
  6. struct siginfo;
  7. #ifndef __KERNEL__
  8. /* Here we must cater to libcs that poke about in kernel headers. */
  9. #define NSIG 32
  10. typedef unsigned long sigset_t;
  11. #endif /* __KERNEL__ */
  12. /*
  13. * Linux/AXP has different signal numbers that Linux/i386: I'm trying
  14. * to make it OSF/1 binary compatible, at least for normal binaries.
  15. */
  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 SIGEMT 7
  23. #define SIGFPE 8
  24. #define SIGKILL 9
  25. #define SIGBUS 10
  26. #define SIGSEGV 11
  27. #define SIGSYS 12
  28. #define SIGPIPE 13
  29. #define SIGALRM 14
  30. #define SIGTERM 15
  31. #define SIGURG 16
  32. #define SIGSTOP 17
  33. #define SIGTSTP 18
  34. #define SIGCONT 19
  35. #define SIGCHLD 20
  36. #define SIGTTIN 21
  37. #define SIGTTOU 22
  38. #define SIGIO 23
  39. #define SIGXCPU 24
  40. #define SIGXFSZ 25
  41. #define SIGVTALRM 26
  42. #define SIGPROF 27
  43. #define SIGWINCH 28
  44. #define SIGINFO 29
  45. #define SIGUSR1 30
  46. #define SIGUSR2 31
  47. #define SIGPOLL SIGIO
  48. #define SIGPWR SIGINFO
  49. #define SIGIOT SIGABRT
  50. /* These should not be considered constants from userland. */
  51. #define SIGRTMIN 32
  52. #define SIGRTMAX _NSIG
  53. #define SA_ONSTACK 0x00000001
  54. #define SA_RESTART 0x00000002
  55. #define SA_NOCLDSTOP 0x00000004
  56. #define SA_NODEFER 0x00000008
  57. #define SA_RESETHAND 0x00000010
  58. #define SA_NOCLDWAIT 0x00000020
  59. #define SA_SIGINFO 0x00000040
  60. #define SA_ONESHOT SA_RESETHAND
  61. #define SA_NOMASK SA_NODEFER
  62. #define MINSIGSTKSZ 4096
  63. #define SIGSTKSZ 16384
  64. #define SIG_BLOCK 1 /* for blocking signals */
  65. #define SIG_UNBLOCK 2 /* for unblocking signals */
  66. #define SIG_SETMASK 3 /* for setting the signal mask */
  67. #include <asm-generic/signal-defs.h>
  68. #ifndef __KERNEL__
  69. /* Here we must cater to libcs that poke about in kernel headers. */
  70. struct sigaction {
  71. union {
  72. __sighandler_t _sa_handler;
  73. void (*_sa_sigaction)(int, struct siginfo *, void *);
  74. } _u;
  75. sigset_t sa_mask;
  76. int sa_flags;
  77. };
  78. #define sa_handler _u._sa_handler
  79. #define sa_sigaction _u._sa_sigaction
  80. #endif /* __KERNEL__ */
  81. typedef struct sigaltstack {
  82. void __user *ss_sp;
  83. int ss_flags;
  84. __kernel_size_t ss_size;
  85. } stack_t;
  86. /* sigstack(2) is deprecated, and will be withdrawn in a future version
  87. of the X/Open CAE Specification. Use sigaltstack instead. It is only
  88. implemented here for OSF/1 compatibility. */
  89. struct sigstack {
  90. void __user *ss_sp;
  91. int ss_onstack;
  92. };
  93. #endif /* _UAPI_ASMAXP_SIGNAL_H */