sigcontext.h 2.1 KB

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