signal.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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 long trap_no, error_code, oldmask;
  26. unsigned long arm_r0, arm_r1, arm_r2, arm_r3;
  27. unsigned long arm_r4, arm_r5, arm_r6, arm_r7;
  28. unsigned long arm_r8, arm_r9, arm_r10, arm_fp;
  29. unsigned long arm_ip, arm_sp, arm_lr, arm_pc;
  30. unsigned long arm_cpsr, fault_address;
  31. };
  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 SIGBUS 7
  41. #define SIGFPE 8
  42. #define SIGKILL 9
  43. #define SIGUSR1 10
  44. #define SIGSEGV 11
  45. #define SIGUSR2 12
  46. #define SIGPIPE 13
  47. #define SIGALRM 14
  48. #define SIGTERM 15
  49. #define SIGSTKFLT 16
  50. #define SIGCHLD 17
  51. #define SIGCONT 18
  52. #define SIGSTOP 19
  53. #define SIGTSTP 20
  54. #define SIGTTIN 21
  55. #define SIGTTOU 22
  56. #define SIGURG 23
  57. #define SIGXCPU 24
  58. #define SIGXFSZ 25
  59. #define SIGVTALRM 26
  60. #define SIGPROF 27
  61. #define SIGWINCH 28
  62. #define SIGIO 29
  63. #define SIGPOLL 29
  64. #define SIGPWR 30
  65. #define SIGSYS 31
  66. #define SIGUNUSED SIGSYS
  67. #define _NSIG 65