sigcontext_64.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. #ifndef __SPARC64_SIGCONTEXT_H
  2. #define __SPARC64_SIGCONTEXT_H
  3. #ifdef __KERNEL__
  4. #include <asm/ptrace.h>
  5. #endif
  6. #ifndef __ASSEMBLY__
  7. #ifdef __KERNEL__
  8. #define __SUNOS_MAXWIN 31
  9. /* This is what SunOS does, so shall I unless we use new 32bit signals or rt signals. */
  10. struct sigcontext32 {
  11. int sigc_onstack; /* state to restore */
  12. int sigc_mask; /* sigmask to restore */
  13. int sigc_sp; /* stack pointer */
  14. int sigc_pc; /* program counter */
  15. int sigc_npc; /* next program counter */
  16. int sigc_psr; /* for condition codes etc */
  17. int sigc_g1; /* User uses these two registers */
  18. int sigc_o0; /* within the trampoline code. */
  19. /* Now comes information regarding the users window set
  20. * at the time of the signal.
  21. */
  22. int sigc_oswins; /* outstanding windows */
  23. /* stack ptrs for each regwin buf */
  24. unsigned sigc_spbuf[__SUNOS_MAXWIN];
  25. /* Windows to restore after signal */
  26. struct reg_window32 sigc_wbuf[__SUNOS_MAXWIN];
  27. };
  28. #endif
  29. #ifdef __KERNEL__
  30. /* This is what we use for 32bit new non-rt signals. */
  31. typedef struct {
  32. struct {
  33. unsigned int psr;
  34. unsigned int pc;
  35. unsigned int npc;
  36. unsigned int y;
  37. unsigned int u_regs[16]; /* globals and ins */
  38. } si_regs;
  39. int si_mask;
  40. } __siginfo32_t;
  41. #endif
  42. typedef struct {
  43. unsigned int si_float_regs [64];
  44. unsigned long si_fsr;
  45. unsigned long si_gsr;
  46. unsigned long si_fprs;
  47. } __siginfo_fpu_t;
  48. /* This is what SunOS doesn't, so we have to write this alone
  49. and do it properly. */
  50. struct sigcontext {
  51. /* The size of this array has to match SI_MAX_SIZE from siginfo.h */
  52. char sigc_info[128];
  53. struct {
  54. unsigned long u_regs[16]; /* globals and ins */
  55. unsigned long tstate;
  56. unsigned long tpc;
  57. unsigned long tnpc;
  58. unsigned int y;
  59. unsigned int fprs;
  60. } sigc_regs;
  61. __siginfo_fpu_t * sigc_fpu_save;
  62. struct {
  63. void * ss_sp;
  64. int ss_flags;
  65. unsigned long ss_size;
  66. } sigc_stack;
  67. unsigned long sigc_mask;
  68. };
  69. #endif /* !(__ASSEMBLY__) */
  70. #endif /* !(__SPARC64_SIGCONTEXT_H) */