1
0

signal.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. struct {
  7. unsigned long r0, r1, r2, r3, r4, r5, r6, r7;
  8. unsigned long r8, r9, r10, r11, r12, r13, r14, r15;
  9. unsigned long r16, r17, r18, r19, r20, r21, r22, r23;
  10. unsigned long r24, r25, r26, r27, r28, r29, r30, r31;
  11. unsigned long pc, msr, ear, esr, fsr;
  12. int pt_mode;
  13. } regs;
  14. unsigned long oldmask;
  15. } mcontext_t;
  16. #else
  17. typedef struct {
  18. unsigned long __regs[39];
  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. } ucontext_t;
  28. #define SA_NOCLDSTOP 1
  29. #define SA_NOCLDWAIT 2
  30. #define SA_SIGINFO 4
  31. #define SA_ONSTACK 0x08000000
  32. #define SA_RESTART 0x10000000
  33. #define SA_NODEFER 0x40000000
  34. #define SA_RESETHAND 0x80000000
  35. #define SA_RESTORER 0x04000000
  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
  70. #define _NSIG 65