sigcontext.h
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:2k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. /* $Id: sigcontext.h,v 1.14 1999/09/06 08:22:05 jj Exp $ */
  2. #ifndef __SPARC_SIGCONTEXT_H
  3. #define __SPARC_SIGCONTEXT_H
  4. #ifdef __KERNEL__
  5. #include <asm/ptrace.h>
  6. #endif
  7. #ifndef __ASSEMBLY__
  8. #define __SUNOS_MAXWIN   31
  9. /* This is what SunOS does, so shall I. */
  10. struct sigcontext {
  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. char *sigc_spbuf[__SUNOS_MAXWIN];
  25. /* Windows to restore after signal */
  26. struct {
  27. unsigned long locals[8];
  28. unsigned long ins[8];
  29. } sigc_wbuf[__SUNOS_MAXWIN];
  30. };
  31. typedef struct {
  32. struct {
  33. unsigned long psr;
  34. unsigned long pc;
  35. unsigned long npc;
  36. unsigned long y;
  37. unsigned long u_regs[16]; /* globals and ins */
  38. } si_regs;
  39. int si_mask;
  40. } __siginfo_t;
  41. typedef struct {
  42. unsigned   long si_float_regs [32];
  43. unsigned   long si_fsr;
  44. unsigned   long si_fpqdepth;
  45. struct {
  46. unsigned long *insn_addr;
  47. unsigned long insn;
  48. } si_fpqueue [16];
  49. } __siginfo_fpu_t;
  50. #ifdef __KERNEL__
  51. /* This magic should be in g_upper[0] for all upper parts
  52.    to be valid.
  53.    This is generated by sparc64 only, but for 32bit processes,
  54.    so we define it here as well.  */
  55. #define SIGINFO_EXTRA_V8PLUS_MAGIC      0x130e269
  56. typedef struct {
  57. unsigned   int g_upper[8];
  58. unsigned   int o_upper[8];
  59. } siginfo_extra_v8plus_t;
  60. #endif
  61. #endif /* !(__ASSEMBLY__) */
  62. #endif /* !(__SPARC_SIGCONTEXT_H) */