1
0

signal.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
  2. || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
  3. typedef struct {
  4. unsigned long __regs[39];
  5. } mcontext_t;
  6. typedef struct __ucontext {
  7. unsigned long uc_flags;
  8. struct __ucontext *uc_link;
  9. stack_t uc_stack;
  10. mcontext_t uc_mcontext;
  11. sigset_t uc_sigmask;
  12. } ucontext_t;
  13. #define SA_NOCLDSTOP 1
  14. #define SA_NOCLDWAIT 2
  15. #define SA_SIGINFO 4
  16. #define SA_ONSTACK 0x08000000
  17. #define SA_RESTART 0x10000000
  18. #define SA_NODEFER 0x40000000
  19. #define SA_RESETHAND 0x80000000
  20. #define SA_RESTORER 0x04000000
  21. #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
  22. struct sigcontext
  23. {
  24. struct {
  25. unsigned long r0, r1, r2, r3, r4, r5, r6, r7;
  26. unsigned long r8, r9, r10, r11, r12, r13, r14, r15;
  27. unsigned long r16, r17, r18, r19, r20, r21, r22, r23;
  28. unsigned long r24, r25, r26, r27, r28, r29, r30, r31;
  29. unsigned long pc, msr, ear, esr, fsr;
  30. int pt_mode;
  31. } regs;
  32. unsigned long oldmask;
  33. };
  34. #define NSIG 64
  35. #endif
  36. #endif
  37. #define SIGHUP 1
  38. #define SIGINT 2
  39. #define SIGQUIT 3
  40. #define SIGILL 4
  41. #define SIGTRAP 5
  42. #define SIGABRT 6
  43. #define SIGBUS 7
  44. #define SIGFPE 8
  45. #define SIGKILL 9
  46. #define SIGUSR1 10
  47. #define SIGSEGV 11
  48. #define SIGUSR2 12
  49. #define SIGPIPE 13
  50. #define SIGALRM 14
  51. #define SIGTERM 15
  52. #define SIGSTKFLT 16
  53. #define SIGCHLD 17
  54. #define SIGCONT 18
  55. #define SIGSTOP 19
  56. #define SIGTSTP 20
  57. #define SIGTTIN 21
  58. #define SIGTTOU 22
  59. #define SIGURG 23
  60. #define SIGXCPU 24
  61. #define SIGXFSZ 25
  62. #define SIGVTALRM 26
  63. #define SIGPROF 27
  64. #define SIGWINCH 28
  65. #define SIGIO 29
  66. #define SIGPOLL 29
  67. #define SIGPWR 30
  68. #define SIGSYS 31
  69. #define SIGUNUSED SIGSYS