signal.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2. /*
  3. * include/asm-xtensa/signal.h
  4. *
  5. * Swiped from SH.
  6. *
  7. * This file is subject to the terms and conditions of the GNU General Public
  8. * License. See the file "COPYING" in the main directory of this archive
  9. * for more details.
  10. *
  11. * Copyright (C) 2001 - 2005 Tensilica Inc.
  12. */
  13. #ifndef _UAPI_XTENSA_SIGNAL_H
  14. #define _UAPI_XTENSA_SIGNAL_H
  15. #define _NSIG 64
  16. #define _NSIG_BPW 32
  17. #define _NSIG_WORDS (_NSIG / _NSIG_BPW)
  18. #ifndef __ASSEMBLY__
  19. #include <linux/types.h>
  20. /* Avoid too many header ordering problems. */
  21. struct siginfo;
  22. typedef unsigned long old_sigset_t; /* at least 32 bits */
  23. typedef struct {
  24. unsigned long sig[_NSIG_WORDS];
  25. } sigset_t;
  26. #endif
  27. #define SIGHUP 1
  28. #define SIGINT 2
  29. #define SIGQUIT 3
  30. #define SIGILL 4
  31. #define SIGTRAP 5
  32. #define SIGABRT 6
  33. #define SIGIOT 6
  34. #define SIGBUS 7
  35. #define SIGFPE 8
  36. #define SIGKILL 9
  37. #define SIGUSR1 10
  38. #define SIGSEGV 11
  39. #define SIGUSR2 12
  40. #define SIGPIPE 13
  41. #define SIGALRM 14
  42. #define SIGTERM 15
  43. #define SIGSTKFLT 16
  44. #define SIGCHLD 17
  45. #define SIGCONT 18
  46. #define SIGSTOP 19
  47. #define SIGTSTP 20
  48. #define SIGTTIN 21
  49. #define SIGTTOU 22
  50. #define SIGURG 23
  51. #define SIGXCPU 24
  52. #define SIGXFSZ 25
  53. #define SIGVTALRM 26
  54. #define SIGPROF 27
  55. #define SIGWINCH 28
  56. #define SIGIO 29
  57. #define SIGPOLL SIGIO
  58. /* #define SIGLOST 29 */
  59. #define SIGPWR 30
  60. #define SIGSYS 31
  61. #define SIGUNUSED 31
  62. /* These should not be considered constants from userland. */
  63. #define SIGRTMIN 32
  64. #define SIGRTMAX (_NSIG-1)
  65. /*
  66. * SA_FLAGS values:
  67. *
  68. * SA_ONSTACK indicates that a registered stack_t will be used.
  69. * SA_RESTART flag to get restarting signals (which were the default long ago)
  70. * SA_NOCLDSTOP flag to turn off SIGCHLD when children stop.
  71. * SA_RESETHAND clears the handler when the signal is delivered.
  72. * SA_NOCLDWAIT flag on SIGCHLD to inhibit zombies.
  73. * SA_NODEFER prevents the current signal from being masked in the handler.
  74. *
  75. * SA_ONESHOT and SA_NOMASK are the historical Linux names for the Single
  76. * Unix names RESETHAND and NODEFER respectively.
  77. */
  78. #define SA_NOCLDSTOP 0x00000001
  79. #define SA_NOCLDWAIT 0x00000002 /* not supported yet */
  80. #define SA_SIGINFO 0x00000004
  81. #define SA_ONSTACK 0x08000000
  82. #define SA_RESTART 0x10000000
  83. #define SA_NODEFER 0x40000000
  84. #define SA_RESETHAND 0x80000000
  85. #define SA_NOMASK SA_NODEFER
  86. #define SA_ONESHOT SA_RESETHAND
  87. #define SA_RESTORER 0x04000000
  88. #define MINSIGSTKSZ 2048
  89. #define SIGSTKSZ 8192
  90. #ifndef __ASSEMBLY__
  91. #include <asm-generic/signal-defs.h>
  92. #ifndef __KERNEL__
  93. /* Here we must cater to libcs that poke about in kernel headers. */
  94. struct sigaction {
  95. union {
  96. __sighandler_t _sa_handler;
  97. void (*_sa_sigaction)(int, struct siginfo *, void *);
  98. } _u;
  99. sigset_t sa_mask;
  100. unsigned long sa_flags;
  101. void (*sa_restorer)(void);
  102. };
  103. #define sa_handler _u._sa_handler
  104. #define sa_sigaction _u._sa_sigaction
  105. #endif /* __KERNEL__ */
  106. typedef struct sigaltstack {
  107. void *ss_sp;
  108. int ss_flags;
  109. size_t ss_size;
  110. } stack_t;
  111. #endif /* __ASSEMBLY__ */
  112. #endif /* _UAPI_XTENSA_SIGNAL_H */