signal_powerpc.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. #ifndef _ASM_POWERPC_SIGNAL_H
  3. #define _ASM_POWERPC_SIGNAL_H
  4. #include <linux/types.h>
  5. #define _NSIG 64
  6. #ifdef __powerpc64__
  7. #define _NSIG_BPW 64
  8. #else
  9. #define _NSIG_BPW 32
  10. #endif
  11. #define _NSIG_WORDS (_NSIG / _NSIG_BPW)
  12. typedef unsigned long old_sigset_t; /* at least 32 bits */
  13. typedef struct {
  14. unsigned long sig[_NSIG_WORDS];
  15. } sigset_t;
  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 0x04000000U
  57. #ifdef __powerpc64__
  58. #define MINSIGSTKSZ 8192
  59. #define SIGSTKSZ 32768
  60. #else
  61. #define MINSIGSTKSZ 2048
  62. #define SIGSTKSZ 8192
  63. #endif
  64. #include <asm-generic/signal-defs.h>
  65. struct old_sigaction {
  66. __sighandler_t sa_handler;
  67. old_sigset_t sa_mask;
  68. unsigned long sa_flags;
  69. __sigrestore_t sa_restorer;
  70. };
  71. struct sigaction {
  72. __sighandler_t sa_handler;
  73. unsigned long sa_flags;
  74. __sigrestore_t sa_restorer;
  75. sigset_t sa_mask; /* mask last for extensibility */
  76. };
  77. typedef struct sigaltstack {
  78. void *ss_sp;
  79. int ss_flags;
  80. __kernel_size_t ss_size;
  81. } stack_t;
  82. #ifndef __powerpc64__
  83. /*
  84. * These are parameters to dbg_sigreturn syscall. They enable or
  85. * disable certain debugging things that can be done from signal
  86. * handlers. The dbg_sigreturn syscall *must* be called from a
  87. * SA_SIGINFO signal so the ucontext can be passed to it. It takes an
  88. * array of struct sig_dbg_op, which has the debug operations to
  89. * perform before returning from the signal.
  90. */
  91. struct sig_dbg_op {
  92. int dbg_type;
  93. unsigned long dbg_value;
  94. };
  95. /* Enable or disable single-stepping. The value sets the state. */
  96. #define SIG_DBG_SINGLE_STEPPING 1
  97. /* Enable or disable branch tracing. The value sets the state. */
  98. #define SIG_DBG_BRANCH_TRACING 2
  99. #endif /* ! __powerpc64__ */
  100. #endif /* _ASM_POWERPC_SIGNAL_H */