1
0

signal.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
  2. || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
  3. #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
  4. typedef struct sigcontext
  5. {
  6. unsigned sc_regmask, sc_status;
  7. unsigned long long sc_pc, sc_regs[32], sc_fpregs[32];
  8. unsigned sc_ownedfp, sc_fpc_csr, sc_fpc_eir, sc_used_math, sc_dsp;
  9. unsigned long long sc_mdhi, sc_mdlo;
  10. unsigned long sc_hi1, sc_lo1, sc_hi2, sc_lo2, sc_hi3, sc_lo3;
  11. } mcontext_t;
  12. #else
  13. typedef struct {
  14. unsigned __mc1[2];
  15. unsigned long long __mc2[65];
  16. unsigned __mc3[5];
  17. unsigned long long __mc4[2];
  18. unsigned __mc5[6];
  19. } mcontext_t;
  20. #endif
  21. typedef struct __ucontext {
  22. unsigned long uc_flags;
  23. struct __ucontext *uc_link;
  24. stack_t uc_stack;
  25. mcontext_t uc_mcontext;
  26. sigset_t uc_sigmask;
  27. unsigned long uc_regspace[128];
  28. } ucontext_t;
  29. #define SA_NOCLDSTOP 1
  30. #define SA_NOCLDWAIT 0x10000
  31. #define SA_SIGINFO 8
  32. #define SA_ONSTACK 0x08000000
  33. #define SA_RESTART 0x10000000
  34. #define SA_NODEFER 0x40000000
  35. #define SA_RESETHAND 0x80000000
  36. #define SA_RESTORER 0x04000000
  37. #undef SIG_BLOCK
  38. #undef SIG_UNBLOCK
  39. #undef SIG_SETMASK
  40. #define SIG_BLOCK 1
  41. #define SIG_UNBLOCK 2
  42. #define SIG_SETMASK 3
  43. #endif
  44. #define SIGHUP 1
  45. #define SIGINT 2
  46. #define SIGQUIT 3
  47. #define SIGILL 4
  48. #define SIGTRAP 5
  49. #define SIGABRT 6
  50. #define SIGIOT SIGABRT
  51. #define SIGSTKFLT 7
  52. #define SIGFPE 8
  53. #define SIGKILL 9
  54. #define SIGBUS 10
  55. #define SIGSEGV 11
  56. #define SIGSYS 12
  57. #define SIGPIPE 13
  58. #define SIGALRM 14
  59. #define SIGTERM 15
  60. #define SIGUSR1 16
  61. #define SIGUSR2 17
  62. #define SIGCHLD 18
  63. #define SIGPWR 19
  64. #define SIGWINCH 20
  65. #define SIGURG 21
  66. #define SIGIO 22
  67. #define SIGPOLL SIGIO
  68. #define SIGSTOP 23
  69. #define SIGTSTP 24
  70. #define SIGCONT 25
  71. #define SIGTTIN 26
  72. #define SIGTTOU 27
  73. #define SIGVTALRM 28
  74. #define SIGPROF 29
  75. #define SIGXCPU 30
  76. #define SIGXFSZ 31
  77. #define SIGUNUSED SIGSYS
  78. #define _NSIG 129