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. typedef struct {
  4. unsigned long __regs[39];
  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. } ucontext_t;
  13. #define SA_NOCLDSTOP 1
  14. #define SA_NOCLDWAIT 2
  15. #define SA_SIGINFO 4
  16. #define SA_ONSTACK 0x08000000
  17. #define SA_RESTART 0x10000000
  18. #define SA_NODEFER 0x40000000
  19. #define SA_RESETHAND 0x80000000
  20. #define SA_RESTORER 0x04000000
  21. #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
  22. struct sigcontext
  23. {
  24. struct {
  25. unsigned long r0, r1, r2, r3, r4, r5, r6, r7;
  26. unsigned long r8, r9, r10, r11, r12, r13, r14, r15;
  27. unsigned long r16, r17, r18, r19, r20, r21, r22, r23;
  28. unsigned long r24, r25, r26, r27, r28, r29, r30, r31;
  29. unsigned long pc, msr, ear, esr, fsr;
  30. int pt_mode;
  31. } regs;
  32. unsigned long oldmask;
  33. };
  34. #endif
  35. #endif
  36. #define SIGHUP 1
  37. #define SIGINT 2
  38. #define SIGQUIT 3
  39. #define SIGILL 4
  40. #define SIGTRAP 5
  41. #define SIGABRT 6
  42. #define SIGBUS 7
  43. #define SIGFPE 8
  44. #define SIGKILL 9
  45. #define SIGUSR1 10
  46. #define SIGSEGV 11
  47. #define SIGUSR2 12
  48. #define SIGPIPE 13
  49. #define SIGALRM 14
  50. #define SIGTERM 15
  51. #define SIGSTKFLT 16
  52. #define SIGCHLD 17
  53. #define SIGCONT 18
  54. #define SIGSTOP 19
  55. #define SIGTSTP 20
  56. #define SIGTTIN 21
  57. #define SIGTTOU 22
  58. #define SIGURG 23
  59. #define SIGXCPU 24
  60. #define SIGXFSZ 25
  61. #define SIGVTALRM 26
  62. #define SIGPROF 27
  63. #define SIGWINCH 28
  64. #define SIGIO 29
  65. #define SIGPOLL 29
  66. #define SIGPWR 30
  67. #define SIGSYS 31
  68. #define SIGUNUSED SIGSYS
  69. #define _NSIG 65