signal.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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[21];
  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. unsigned long uc_regspace[128];
  13. } ucontext_t;
  14. #define SA_NOCLDSTOP 1
  15. #define SA_NOCLDWAIT 2
  16. #define SA_SIGINFO 4
  17. #define SA_ONSTACK 0x08000000
  18. #define SA_RESTART 0x10000000
  19. #define SA_NODEFER 0x40000000
  20. #define SA_RESETHAND 0x80000000
  21. #define SA_RESTORER 0x04000000
  22. #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
  23. struct sigcontext
  24. {
  25. unsigned sc_regmask, sc_status;
  26. unsigned long long sc_pc, sc_regs[32], sc_fpregs[32];
  27. unsigned sc_ownedfp, sc_fpc_csr, sc_fpc_eir, sc_used_math, sc_dsp;
  28. unsigned long long sc_mdhi, sc_mdlo;
  29. unsigned long sc_hi1, sc_lo1, sc_hi2, sc_lo2, sc_hi3, sc_lo3;
  30. };
  31. #define NSIG 64
  32. #endif
  33. #endif
  34. #define SIGHUP 1
  35. #define SIGINT 2
  36. #define SIGQUIT 3
  37. #define SIGILL 4
  38. #define SIGTRAP 5
  39. #define SIGABRT 6
  40. #define SIGIOT SIGABRT
  41. #define SIGSTKFLT 7
  42. #define SIGFPE 8
  43. #define SIGKILL 9
  44. #define SIGBUS 10
  45. #define SIGSEGV 11
  46. #define SIGSYS 12
  47. #define SIGPIPE 13
  48. #define SIGALRM 14
  49. #define SIGTERM 15
  50. #define SIGUSR1 16
  51. #define SIGUSR2 17
  52. #define SIGCHLD 18
  53. #define SIGPWR 19
  54. #define SIGWINCH 20
  55. #define SIGURG 21
  56. #define SIGIO 22
  57. #define SIGPOLL SIGIO
  58. #define SIGSTOP 23
  59. #define SIGTSTP 24
  60. #define SIGCONT 25
  61. #define SIGTTIN 26
  62. #define SIGTTOU 27
  63. #define SIGVTALRM 28
  64. #define SIGPROF 29
  65. #define SIGXCPU 30
  66. #define SIGXFSZ 31
  67. #define SIGUNUSED SIGSYS