2
0

target_os_signal.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. #ifndef TARGET_OS_SIGNAL_H
  2. #define TARGET_OS_SIGNAL_H
  3. #include "target_os_siginfo.h"
  4. #include "target_arch_signal.h"
  5. abi_long setup_sigframe_arch(CPUArchState *env, abi_ulong frame_addr,
  6. struct target_sigframe *frame, int flags);
  7. /* Compare to sys/signal.h */
  8. #define TARGET_SIGHUP 1 /* hangup */
  9. #define TARGET_SIGINT 2 /* interrupt */
  10. #define TARGET_SIGQUIT 3 /* quit */
  11. #define TARGET_SIGILL 4 /* illegal instruction (not reset when caught) */
  12. #define TARGET_SIGTRAP 5 /* trace trap (not reset when caught) */
  13. #define TARGET_SIGABRT 6 /* abort() */
  14. #define TARGET_SIGIOT SIGABRT /* compatibility */
  15. #define TARGET_SIGEMT 7 /* EMT instruction */
  16. #define TARGET_SIGFPE 8 /* floating point exception */
  17. #define TARGET_SIGKILL 9 /* kill (cannot be caught or ignored) */
  18. #define TARGET_SIGBUS 10 /* bus error */
  19. #define TARGET_SIGSEGV 11 /* segmentation violation */
  20. #define TARGET_SIGSYS 12 /* bad argument to system call */
  21. #define TARGET_SIGPIPE 13 /* write on a pipe with no one to read it */
  22. #define TARGET_SIGALRM 14 /* alarm clock */
  23. #define TARGET_SIGTERM 15 /* software termination signal from kill */
  24. #define TARGET_SIGURG 16 /* urgent condition on IO channel */
  25. #define TARGET_SIGSTOP 17 /* sendable stop signal not from tty */
  26. #define TARGET_SIGTSTP 18 /* stop signal from tty */
  27. #define TARGET_SIGCONT 19 /* continue a stopped process */
  28. #define TARGET_SIGCHLD 20 /* to parent on child stop or exit */
  29. #define TARGET_SIGTTIN 21 /* to readers pgrp upon background tty read */
  30. #define TARGET_SIGTTOU 22 /* like TTIN for output if(tp->t_local&LTOSTOP)*/
  31. #define TARGET_SIGIO 23 /* input/output possible signal */
  32. #define TARGET_SIGXCPU 24 /* exceeded CPU time limit */
  33. #define TARGET_SIGXFSZ 25 /* exceeded file size limit */
  34. #define TARGET_SIGVTALRM 26 /* virtual time alarm */
  35. #define TARGET_SIGPROF 27 /* profiling time alarm */
  36. #define TARGET_SIGWINCH 28 /* window size changes */
  37. #define TARGET_SIGINFO 29 /* information request */
  38. #define TARGET_SIGUSR1 30 /* user defined signal 1 */
  39. #define TARGET_SIGUSR2 31 /* user defined signal 2 */
  40. #define TARGET_SIGTHR 32 /* reserved by thread library */
  41. #define TARGET_SIGLWP SIGTHR /* compatibility */
  42. #define TARGET_SIGLIBRT 33 /* reserved by the real-time library */
  43. #define TARGET_SIGRTMIN 65
  44. #define TARGET_SIGRTMAX 126
  45. /*
  46. * Language spec says we must list exactly one parameter, even though we
  47. * actually supply three. Ugh!
  48. */
  49. #define TARGET_SIG_DFL ((abi_long)0) /* default signal handling */
  50. #define TARGET_SIG_IGN ((abi_long)1) /* ignore signal */
  51. #define TARGET_SIG_ERR ((abi_long)-1) /* error return from signal */
  52. #define TARGET_SA_ONSTACK 0x0001 /* take signal on signal stack */
  53. #define TARGET_SA_RESTART 0x0002 /* restart system on signal return */
  54. #define TARGET_SA_RESETHAND 0x0004 /* reset to SIG_DFL when taking signal */
  55. #define TARGET_SA_NODEFER 0x0010 /* don't mask the signal we're delivering */
  56. #define TARGET_SA_NOCLDWAIT 0x0020 /* don't create zombies (assign to pid 1) */
  57. #define TARGET_SA_USERTRAMP 0x0100 /* do not bounce off kernel's sigtramp */
  58. #define TARGET_SA_NOCLDSTOP 0x0008 /* do not generate SIGCHLD on child stop */
  59. #define TARGET_SA_SIGINFO 0x0040 /* generate siginfo_t */
  60. /*
  61. * Flags for sigprocmask:
  62. */
  63. #define TARGET_SIG_BLOCK 1 /* block specified signal set */
  64. #define TARGET_SIG_UNBLOCK 2 /* unblock specified signal set */
  65. #define TARGET_SIG_SETMASK 3 /* set specified signal set */
  66. #define TARGET_BADSIG SIG_ERR
  67. /*
  68. * sigaltstack control
  69. */
  70. #define TARGET_SS_ONSTACK 0x0001 /* take signals on alternate stack */
  71. #define TARGET_SS_DISABLE 0x0004 /* disable taking signals on alternate stack*/
  72. #endif /* TARGET_OS_SIGNAL_H */