signal.h 1.8 KB

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