sigcontext.h
上传用户:lgb322
上传日期:2013-02-24
资源大小:30529k
文件大小:2k
源码类别:

嵌入式Linux

开发平台:

Unix_Linux

  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. #ifdef __KERNEL__
  71. /* This magic should be in g_upper[0] for all upper parts
  72.    to be valid.  */
  73. #define SIGINFO_EXTRA_V8PLUS_MAGIC 0x130e269
  74. typedef struct {
  75. unsigned   int g_upper[8];
  76. unsigned   int o_upper[8];
  77. } siginfo_extra_v8plus_t;
  78. #endif
  79. #endif /* !(__ASSEMBLY__) */
  80. #endif /* !(__SPARC64_SIGCONTEXT_H) */