signal.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. /*
  3. * S390 version
  4. *
  5. * Derived from "include/asm-i386/signal.h"
  6. */
  7. #ifndef _UAPI_ASMS390_SIGNAL_H
  8. #define _UAPI_ASMS390_SIGNAL_H
  9. #include <linux/types.h>
  10. #include <linux/time.h>
  11. /* Avoid too many header ordering problems. */
  12. struct siginfo;
  13. struct pt_regs;
  14. #ifndef __KERNEL__
  15. /* Here we must cater to libcs that poke about in kernel headers. */
  16. #define NSIG 32
  17. typedef unsigned long sigset_t;
  18. #endif /* __KERNEL__ */
  19. #define SIGHUP 1
  20. #define SIGINT 2
  21. #define SIGQUIT 3
  22. #define SIGILL 4
  23. #define SIGTRAP 5
  24. #define SIGABRT 6
  25. #define SIGIOT 6
  26. #define SIGBUS 7
  27. #define SIGFPE 8
  28. #define SIGKILL 9
  29. #define SIGUSR1 10
  30. #define SIGSEGV 11
  31. #define SIGUSR2 12
  32. #define SIGPIPE 13
  33. #define SIGALRM 14
  34. #define SIGTERM 15
  35. #define SIGSTKFLT 16
  36. #define SIGCHLD 17
  37. #define SIGCONT 18
  38. #define SIGSTOP 19
  39. #define SIGTSTP 20
  40. #define SIGTTIN 21
  41. #define SIGTTOU 22
  42. #define SIGURG 23
  43. #define SIGXCPU 24
  44. #define SIGXFSZ 25
  45. #define SIGVTALRM 26
  46. #define SIGPROF 27
  47. #define SIGWINCH 28
  48. #define SIGIO 29
  49. #define SIGPOLL SIGIO
  50. /*
  51. #define SIGLOST 29
  52. */
  53. #define SIGPWR 30
  54. #define SIGSYS 31
  55. #define SIGUNUSED 31
  56. /* These should not be considered constants from userland. */
  57. #define SIGRTMIN 32
  58. #define SIGRTMAX _NSIG
  59. #define SA_RESTORER 0x04000000
  60. #define MINSIGSTKSZ 2048
  61. #define SIGSTKSZ 8192
  62. #include <asm-generic/signal-defs.h>
  63. #ifndef __KERNEL__
  64. /*
  65. * There are two system calls in regard to sigaction, sys_rt_sigaction
  66. * and sys_sigaction. Internally the kernel uses the struct old_sigaction
  67. * for the older sys_sigaction system call, and the kernel version of the
  68. * struct sigaction for the newer sys_rt_sigaction.
  69. *
  70. * The uapi definition for struct sigaction has made a strange distinction
  71. * between 31-bit and 64-bit in the past. For 64-bit the uapi structure
  72. * looks like the kernel struct sigaction, but for 31-bit it used to
  73. * look like the kernel struct old_sigaction. That practically made the
  74. * structure unusable for either system call. To get around this problem
  75. * the glibc always had its own definitions for the sigaction structures.
  76. *
  77. * The current struct sigaction uapi definition below is suitable for the
  78. * sys_rt_sigaction system call only.
  79. */
  80. struct sigaction {
  81. union {
  82. __sighandler_t _sa_handler;
  83. void (*_sa_sigaction)(int, struct siginfo *, void *);
  84. } _u;
  85. unsigned long sa_flags;
  86. void (*sa_restorer)(void);
  87. sigset_t sa_mask;
  88. };
  89. #define sa_handler _u._sa_handler
  90. #define sa_sigaction _u._sa_sigaction
  91. #endif /* __KERNEL__ */
  92. typedef struct sigaltstack {
  93. void __user *ss_sp;
  94. int ss_flags;
  95. __kernel_size_t ss_size;
  96. } stack_t;
  97. #endif /* _UAPI_ASMS390_SIGNAL_H */