sigcontext.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /* Copyright (C) 2000 Free Software Foundation, Inc.
  2. This file is part of the GNU C Library.
  3. The GNU C Library is free software; you can redistribute it and/or
  4. modify it under the terms of the GNU Lesser General Public
  5. License as published by the Free Software Foundation; either
  6. version 2.1 of the License, or (at your option) any later version.
  7. The GNU C Library is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  10. Lesser General Public License for more details.
  11. You should have received a copy of the GNU Lesser General Public
  12. License along with the GNU C Library; if not, write to the Free
  13. Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
  14. 02111-1307 USA. */
  15. #if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
  16. # error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
  17. #endif
  18. #include <bits/wordsize.h>
  19. #if __WORDSIZE == 32
  20. /* It is quite hard to choose what to put here, because
  21. Linux/sparc32 had at least 3 totally incompatible
  22. signal stack layouts.
  23. This one is for the "new" style signals, which are
  24. now delivered unless SA_SIGINFO is requested. */
  25. struct sigcontext
  26. {
  27. struct
  28. {
  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. };
  37. #else /* sparc64 */
  38. typedef struct
  39. {
  40. unsigned int si_float_regs [64];
  41. unsigned long si_fsr;
  42. unsigned long si_gsr;
  43. unsigned long si_fprs;
  44. } __siginfo_fpu_t;
  45. struct sigcontext
  46. {
  47. char sigc_info[128];
  48. struct
  49. {
  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. {
  60. void * ss_sp;
  61. int ss_flags;
  62. unsigned long ss_size;
  63. } sigc_stack;
  64. unsigned long sigc_mask;
  65. };
  66. #endif /* sparc64 */