sigcontext.h 2.4 KB

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