sigcontext.h 2.2 KB

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