2
0

target_signal.h 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. #ifndef MIPS_TARGET_SIGNAL_H
  2. #define MIPS_TARGET_SIGNAL_H
  3. #define TARGET_SIGHUP 1 /* Hangup (POSIX). */
  4. #define TARGET_SIGINT 2 /* Interrupt (ANSI). */
  5. #define TARGET_SIGQUIT 3 /* Quit (POSIX). */
  6. #define TARGET_SIGILL 4 /* Illegal instruction (ANSI). */
  7. #define TARGET_SIGTRAP 5 /* Trace trap (POSIX). */
  8. #define TARGET_SIGIOT 6 /* IOT trap (4.2 BSD). */
  9. #define TARGET_SIGABRT TARGET_SIGIOT /* Abort (ANSI). */
  10. #define TARGET_SIGEMT 7
  11. #define TARGET_SIGSTKFLT 7 /* XXX: incorrect */
  12. #define TARGET_SIGFPE 8 /* Floating-point exception (ANSI). */
  13. #define TARGET_SIGKILL 9 /* Kill, unblockable (POSIX). */
  14. #define TARGET_SIGBUS 10 /* BUS error (4.2 BSD). */
  15. #define TARGET_SIGSEGV 11 /* Segmentation violation (ANSI). */
  16. #define TARGET_SIGSYS 12
  17. #define TARGET_SIGPIPE 13 /* Broken pipe (POSIX). */
  18. #define TARGET_SIGALRM 14 /* Alarm clock (POSIX). */
  19. #define TARGET_SIGTERM 15 /* Termination (ANSI). */
  20. #define TARGET_SIGUSR1 16 /* User-defined signal 1 (POSIX). */
  21. #define TARGET_SIGUSR2 17 /* User-defined signal 2 (POSIX). */
  22. #define TARGET_SIGCHLD 18 /* Child status has changed (POSIX). */
  23. #define TARGET_SIGCLD TARGET_SIGCHLD /* Same as TARGET_SIGCHLD (System V). */
  24. #define TARGET_SIGPWR 19 /* Power failure restart (System V). */
  25. #define TARGET_SIGWINCH 20 /* Window size change (4.3 BSD, Sun). */
  26. #define TARGET_SIGURG 21 /* Urgent condition on socket (4.2 BSD). */
  27. #define TARGET_SIGIO 22 /* I/O now possible (4.2 BSD). */
  28. #define TARGET_SIGPOLL TARGET_SIGIO /* Pollable event occurred (System V). */
  29. #define TARGET_SIGSTOP 23 /* Stop, unblockable (POSIX). */
  30. #define TARGET_SIGTSTP 24 /* Keyboard stop (POSIX). */
  31. #define TARGET_SIGCONT 25 /* Continue (POSIX). */
  32. #define TARGET_SIGTTIN 26 /* Background read from tty (POSIX). */
  33. #define TARGET_SIGTTOU 27 /* Background write to tty (POSIX). */
  34. #define TARGET_SIGVTALRM 28 /* Virtual alarm clock (4.2 BSD). */
  35. #define TARGET_SIGPROF 29 /* Profiling alarm clock (4.2 BSD). */
  36. #define TARGET_SIGXCPU 30 /* CPU limit exceeded (4.2 BSD). */
  37. #define TARGET_SIGXFSZ 31 /* File size limit exceeded (4.2 BSD). */
  38. #define TARGET_SIGRTMIN 32
  39. #define TARGET_SIG_BLOCK 1 /* for blocking signals */
  40. #define TARGET_SIG_UNBLOCK 2 /* for unblocking signals */
  41. #define TARGET_SIG_SETMASK 3 /* for setting the signal mask */
  42. /* this struct defines a stack used during syscall handling */
  43. typedef struct target_sigaltstack {
  44. abi_ulong ss_sp;
  45. abi_ulong ss_size;
  46. abi_int ss_flags;
  47. } target_stack_t;
  48. /*
  49. * sigaltstack controls
  50. */
  51. #define TARGET_SS_ONSTACK 1
  52. #define TARGET_SS_DISABLE 2
  53. #define TARGET_SA_NOCLDSTOP 0x00000001
  54. #define TARGET_SA_NOCLDWAIT 0x00010000
  55. #define TARGET_SA_SIGINFO 0x00000008
  56. #define TARGET_SA_ONSTACK 0x08000000
  57. #define TARGET_SA_NODEFER 0x40000000
  58. #define TARGET_SA_RESTART 0x10000000
  59. #define TARGET_SA_RESETHAND 0x80000000
  60. #define TARGET_SA_RESTORER 0x04000000 /* Only for O32 */
  61. #define TARGET_MINSIGSTKSZ 2048
  62. #if defined(TARGET_ABI_MIPSO32)
  63. /* compare linux/arch/mips/kernel/signal.c:setup_frame() */
  64. #define TARGET_ARCH_HAS_SETUP_FRAME
  65. #endif
  66. #define TARGET_ARCH_HAS_SIGTRAMP_PAGE 1
  67. /* bit-flags */
  68. #define TARGET_SS_AUTODISARM (1U << 31) /* disable sas during sighandling */
  69. /* mask for all SS_xxx flags */
  70. #define TARGET_SS_FLAG_BITS TARGET_SS_AUTODISARM
  71. #endif /* MIPS_TARGET_SIGNAL_H */