sigcontext.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. * include/asm-s390/sigcontext.h
  3. *
  4. * S390 version
  5. * Copyright (C) 1999,2000 IBM Deutschland Entwicklung GmbH, IBM Corporation
  6. */
  7. #ifndef _ASM_S390_SIGCONTEXT_H
  8. #define _ASM_S390_SIGCONTEXT_H
  9. #define __NUM_GPRS 16
  10. #define __NUM_FPRS 16
  11. #define __NUM_ACRS 16
  12. #ifndef __s390x__
  13. /* Has to be at least _NSIG_WORDS from asm/signal.h */
  14. #define _SIGCONTEXT_NSIG 64
  15. #define _SIGCONTEXT_NSIG_BPW 32
  16. /* Size of stack frame allocated when calling signal handler. */
  17. #define __SIGNAL_FRAMESIZE 96
  18. #else /* __s390x__ */
  19. /* Has to be at least _NSIG_WORDS from asm/signal.h */
  20. #define _SIGCONTEXT_NSIG 64
  21. #define _SIGCONTEXT_NSIG_BPW 64
  22. /* Size of stack frame allocated when calling signal handler. */
  23. #define __SIGNAL_FRAMESIZE 160
  24. #endif /* __s390x__ */
  25. #define _SIGCONTEXT_NSIG_WORDS (_SIGCONTEXT_NSIG / _SIGCONTEXT_NSIG_BPW)
  26. #define _SIGMASK_COPY_SIZE (sizeof(unsigned long)*_SIGCONTEXT_NSIG_WORDS)
  27. typedef struct
  28. {
  29. unsigned long mask;
  30. unsigned long addr;
  31. } __attribute__ ((aligned(8))) _psw_t;
  32. typedef struct
  33. {
  34. _psw_t psw;
  35. unsigned long gprs[__NUM_GPRS];
  36. unsigned int acrs[__NUM_ACRS];
  37. } _s390_regs_common;
  38. typedef struct
  39. {
  40. unsigned int fpc;
  41. double fprs[__NUM_FPRS];
  42. } _s390_fp_regs;
  43. typedef struct
  44. {
  45. _s390_regs_common regs;
  46. _s390_fp_regs fpregs;
  47. } _sigregs;
  48. struct sigcontext
  49. {
  50. unsigned long oldmask[_SIGCONTEXT_NSIG_WORDS];
  51. _sigregs *sregs;
  52. };
  53. #endif