sigcontext.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /* Copyright (C) 1996, 1997, 1998, 2003, 2004, 2006 Free Software
  2. Foundation, Inc. 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. #ifndef _BITS_SIGCONTEXT_H
  16. #define _BITS_SIGCONTEXT_H 1
  17. #if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
  18. # error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
  19. #endif
  20. #include <sgidefs.h>
  21. #if _MIPS_SIM == _ABIO32
  22. /* Certain unused fields were replaced with new ones in 2.6.12-rc4.
  23. The changes were as follows:
  24. sc_cause -> sc_hi1
  25. sc_badvaddr -> sc_lo1
  26. sc_sigset[0] -> sc_hi2
  27. sc_sigset[1] -> sc_lo2
  28. sc_sigset[2] -> sc_hi3
  29. sc_sigset[3] -> sc_lo3
  30. sc_regmask, sc_ownedfp and sc_fpc_eir are not used. */
  31. struct sigcontext {
  32. unsigned int sc_regmask;
  33. unsigned int sc_status;
  34. unsigned long long sc_pc;
  35. unsigned long long sc_regs[32];
  36. unsigned long long sc_fpregs[32];
  37. unsigned int sc_ownedfp;
  38. unsigned int sc_fpc_csr;
  39. unsigned int sc_fpc_eir;
  40. unsigned int sc_used_math;
  41. unsigned int sc_dsp;
  42. unsigned long long sc_mdhi;
  43. unsigned long long sc_mdlo;
  44. unsigned long sc_hi1;
  45. unsigned long sc_lo1;
  46. unsigned long sc_hi2;
  47. unsigned long sc_lo2;
  48. unsigned long sc_hi3;
  49. unsigned long sc_lo3;
  50. };
  51. #else
  52. /* This structure changed in 2.6.12-rc4 when DSP support was added. */
  53. struct sigcontext {
  54. unsigned long long sc_regs[32];
  55. unsigned long long sc_fpregs[32];
  56. unsigned long long sc_mdhi;
  57. unsigned long long sc_hi1;
  58. unsigned long long sc_hi2;
  59. unsigned long long sc_hi3;
  60. unsigned long long sc_mdlo;
  61. unsigned long long sc_lo1;
  62. unsigned long long sc_lo2;
  63. unsigned long long sc_lo3;
  64. unsigned long long sc_pc;
  65. unsigned int sc_fpc_csr;
  66. unsigned int sc_used_math;
  67. unsigned int sc_dsp;
  68. unsigned int sc_reserved;
  69. };
  70. #endif /* _MIPS_SIM != _ABIO32 */
  71. #endif