signal.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. #ifndef _UAPI_ASM_M32R_SIGNAL_H
  3. #define _UAPI_ASM_M32R_SIGNAL_H
  4. #include <linux/types.h>
  5. #include <linux/time.h>
  6. #include <linux/compiler.h>
  7. /* Avoid too many header ordering problems. */
  8. struct siginfo;
  9. #ifndef __KERNEL__
  10. /* Here we must cater to libcs that poke about in kernel headers. */
  11. #define NSIG 32
  12. typedef unsigned long sigset_t;
  13. #endif /* __KERNEL__ */
  14. #define SIGHUP 1
  15. #define SIGINT 2
  16. #define SIGQUIT 3
  17. #define SIGILL 4
  18. #define SIGTRAP 5
  19. #define SIGABRT 6
  20. #define SIGIOT 6
  21. #define SIGBUS 7
  22. #define SIGFPE 8
  23. #define SIGKILL 9
  24. #define SIGUSR1 10
  25. #define SIGSEGV 11
  26. #define SIGUSR2 12
  27. #define SIGPIPE 13
  28. #define SIGALRM 14
  29. #define SIGTERM 15
  30. #define SIGSTKFLT 16
  31. #define SIGCHLD 17
  32. #define SIGCONT 18
  33. #define SIGSTOP 19
  34. #define SIGTSTP 20
  35. #define SIGTTIN 21
  36. #define SIGTTOU 22
  37. #define SIGURG 23
  38. #define SIGXCPU 24
  39. #define SIGXFSZ 25
  40. #define SIGVTALRM 26
  41. #define SIGPROF 27
  42. #define SIGWINCH 28
  43. #define SIGIO 29
  44. #define SIGPOLL SIGIO
  45. /*
  46. #define SIGLOST 29
  47. */
  48. #define SIGPWR 30
  49. #define SIGSYS 31
  50. #define SIGUNUSED 31
  51. /* These should not be considered constants from userland. */
  52. #define SIGRTMIN 32
  53. #define SIGRTMAX _NSIG
  54. /*
  55. * SA_FLAGS values:
  56. *
  57. * SA_ONSTACK indicates that a registered stack_t will be used.
  58. * SA_RESTART flag to get restarting signals (which were the default long ago)
  59. * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
  60. * SA_RESETHAND clears the handler when the signal is delivered.
  61. * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
  62. * SA_NODEFER prevents the current signal from being masked in the handler.
  63. *
  64. * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
  65. * Unix names RESETHAND and NODEFER respectively.
  66. */
  67. #define SA_NOCLDSTOP 0x00000001u
  68. #define SA_NOCLDWAIT 0x00000002u
  69. #define SA_SIGINFO 0x00000004u
  70. #define SA_ONSTACK 0x08000000u
  71. #define SA_RESTART 0x10000000u
  72. #define SA_NODEFER 0x40000000u
  73. #define SA_RESETHAND 0x80000000u
  74. #define SA_NOMASK SA_NODEFER
  75. #define SA_ONESHOT SA_RESETHAND
  76. #define SA_RESTORER 0x04000000
  77. #define MINSIGSTKSZ 2048
  78. #define SIGSTKSZ 8192
  79. #include <asm-generic/signal-defs.h>
  80. #ifndef __KERNEL__
  81. /* Here we must cater to libcs that poke about in kernel headers. */
  82. struct sigaction {
  83. union {
  84. __sighandler_t _sa_handler;
  85. void (*_sa_sigaction)(int, struct siginfo *, void *);
  86. } _u;
  87. sigset_t sa_mask;
  88. unsigned long sa_flags;
  89. void (*sa_restorer)(void);
  90. };
  91. #define sa_handler _u._sa_handler
  92. #define sa_sigaction _u._sa_sigaction
  93. #endif /* __KERNEL__ */
  94. typedef struct sigaltstack {
  95. void __user *ss_sp;
  96. int ss_flags;
  97. size_t ss_size;
  98. } stack_t;
  99. #endif /* _UAPI_ASM_M32R_SIGNAL_H */