signal.h 2.6 KB

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