signal.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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 unsigned long greg_t, gregset_t[38];
  5. typedef struct sigcontext
  6. {
  7. struct {
  8. unsigned long r0, r1, r2, r3, r4, r5, r6, r7;
  9. unsigned long r8, r9, r10, r11, r12, r13, r14, r15;
  10. unsigned long r16, r17, r18, r19, r20, r21, r22, r23;
  11. unsigned long r24, r25, r26, r27, r28, r29, r30, r31;
  12. unsigned long pc, msr, ear, esr, fsr;
  13. int pt_mode;
  14. } regs;
  15. unsigned long oldmask;
  16. } mcontext_t;
  17. #else
  18. typedef struct {
  19. unsigned long __regs[39];
  20. } mcontext_t;
  21. #endif
  22. typedef struct __ucontext {
  23. unsigned long uc_flags;
  24. struct __ucontext *uc_link;
  25. stack_t uc_stack;
  26. mcontext_t uc_mcontext;
  27. sigset_t uc_sigmask;
  28. } ucontext_t;
  29. #define SA_NOCLDSTOP 1
  30. #define SA_NOCLDWAIT 2
  31. #define SA_SIGINFO 4
  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. #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 SIGBUS 7
  46. #define SIGFPE 8
  47. #define SIGKILL 9
  48. #define SIGUSR1 10
  49. #define SIGSEGV 11
  50. #define SIGUSR2 12
  51. #define SIGPIPE 13
  52. #define SIGALRM 14
  53. #define SIGTERM 15
  54. #define SIGSTKFLT 16
  55. #define SIGCHLD 17
  56. #define SIGCONT 18
  57. #define SIGSTOP 19
  58. #define SIGTSTP 20
  59. #define SIGTTIN 21
  60. #define SIGTTOU 22
  61. #define SIGURG 23
  62. #define SIGXCPU 24
  63. #define SIGXFSZ 25
  64. #define SIGVTALRM 26
  65. #define SIGPROF 27
  66. #define SIGWINCH 28
  67. #define SIGIO 29
  68. #define SIGPOLL 29
  69. #define SIGPWR 30
  70. #define SIGSYS 31
  71. #define SIGUNUSED SIGSYS
  72. #define _NSIG 65