sigcontext.h 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /* Copyright (C) 1996, 1997, 1998, 2000, 2001, 2003, 2004
  2. Free Software Foundation, Inc.
  3. This file is part of the GNU C Library.
  4. Contributed by Jes Sorensen <jes@linuxcare.com>, July 2000
  5. The GNU C Library is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU Lesser General Public
  7. License as published by the Free Software Foundation; either
  8. version 2.1 of the License, or (at your option) any later version.
  9. The GNU C Library is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. Lesser General Public License for more details.
  13. You should have received a copy of the GNU Lesser General Public
  14. License along with the GNU C Library; if not, see
  15. <http://www.gnu.org/licenses/>. */
  16. #if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
  17. # error "Never use <bits/sigcontext.h> directly; include <signal.h> instead."
  18. #endif
  19. #ifndef _BITS_SIGCONTEXT_H
  20. #define _BITS_SIGCONTEXT_H 1
  21. #define __need_size_t
  22. #include <stddef.h>
  23. #include <bits/sigstack.h>
  24. struct ia64_fpreg
  25. {
  26. union
  27. {
  28. unsigned long bits[2];
  29. } u;
  30. } __attribute__ ((aligned (16)));
  31. struct sigcontext
  32. {
  33. unsigned long int sc_flags; /* see manifest constants below */
  34. unsigned long int sc_nat; /* bit i == 1 iff scratch reg gr[i] is a NaT */
  35. stack_t sc_stack; /* previously active stack */
  36. unsigned long int sc_ip; /* instruction pointer */
  37. unsigned long int sc_cfm; /* current frame marker */
  38. unsigned long int sc_um; /* user mask bits */
  39. unsigned long int sc_ar_rsc; /* register stack configuration register */
  40. unsigned long int sc_ar_bsp; /* backing store pointer */
  41. unsigned long int sc_ar_rnat; /* RSE NaT collection register */
  42. unsigned long int sc_ar_ccv; /* compare & exchange compare value register */
  43. unsigned long int sc_ar_unat; /* ar.unat of interrupted context */
  44. unsigned long int sc_ar_fpsr; /* floating-point status register */
  45. unsigned long int sc_ar_pfs; /* previous function state */
  46. unsigned long int sc_ar_lc; /* loop count register */
  47. unsigned long int sc_pr; /* predicate registers */
  48. unsigned long int sc_br[8]; /* branch registers */
  49. unsigned long int sc_gr[32]; /* general registers (static partition) */
  50. struct ia64_fpreg sc_fr[128]; /* floating-point registers */
  51. unsigned long int sc_rbs_base;/* NULL or new base of sighandler's rbs */
  52. unsigned long int sc_loadrs; /* see description above */
  53. unsigned long int sc_ar25; /* cmp8xchg16 uses this */
  54. unsigned long int sc_ar26; /* rsvd for scratch use */
  55. unsigned long int sc_rsvd[12];/* reserved for future use */
  56. /* sc_mask is actually an sigset_t but we don't want to
  57. * include the kernel headers here. */
  58. unsigned long int sc_mask; /* signal mask to restore after handler returns */
  59. };
  60. /* sc_flag bit definitions. */
  61. #define IA64_SC_FLAG_ONSTACK_BIT 0 /* is handler running on signal stack? */
  62. #define IA64_SC_FLAG_IN_SYSCALL_BIT 1 /* did signal interrupt a syscall? */
  63. #define IA64_SC_FLAG_FPH_VALID_BIT 2 /* is state in f[32]-f[127] valid? */
  64. #define IA64_SC_FLAG_ONSTACK (1 << IA64_SC_FLAG_ONSTACK_BIT)
  65. #define IA64_SC_FLAG_IN_SYSCALL (1 << IA64_SC_FLAG_IN_SYSCALL_BIT)
  66. #define IA64_SC_FLAG_FPH_VALID (1 << IA64_SC_FLAG_FPH_VALID_BIT)
  67. #endif /* _BITS_SIGCONTEXT_H */