sigcontext.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. #include <linux/compiler.h>
  10. #define __NUM_GPRS 16
  11. #define __NUM_FPRS 16
  12. #define __NUM_ACRS 16
  13. #ifndef __s390x__
  14. /* Has to be at least _NSIG_WORDS from asm/signal.h */
  15. #define _SIGCONTEXT_NSIG 64
  16. #define _SIGCONTEXT_NSIG_BPW 32
  17. /* Size of stack frame allocated when calling signal handler. */
  18. #define __SIGNAL_FRAMESIZE 96
  19. #else /* __s390x__ */
  20. /* Has to be at least _NSIG_WORDS from asm/signal.h */
  21. #define _SIGCONTEXT_NSIG 64
  22. #define _SIGCONTEXT_NSIG_BPW 64
  23. /* Size of stack frame allocated when calling signal handler. */
  24. #define __SIGNAL_FRAMESIZE 160
  25. #endif /* __s390x__ */
  26. #define _SIGCONTEXT_NSIG_WORDS (_SIGCONTEXT_NSIG / _SIGCONTEXT_NSIG_BPW)
  27. #define _SIGMASK_COPY_SIZE (sizeof(unsigned long)*_SIGCONTEXT_NSIG_WORDS)
  28. typedef struct
  29. {
  30. unsigned long mask;
  31. unsigned long addr;
  32. } __attribute__ ((aligned(8))) _psw_t;
  33. typedef struct
  34. {
  35. _psw_t psw;
  36. unsigned long gprs[__NUM_GPRS];
  37. unsigned int acrs[__NUM_ACRS];
  38. } _s390_regs_common;
  39. typedef struct
  40. {
  41. unsigned int fpc;
  42. double fprs[__NUM_FPRS];
  43. } _s390_fp_regs;
  44. typedef struct
  45. {
  46. _s390_regs_common regs;
  47. _s390_fp_regs fpregs;
  48. } _sigregs;
  49. struct sigcontext
  50. {
  51. unsigned long oldmask[_SIGCONTEXT_NSIG_WORDS];
  52. _sigregs __user *sregs;
  53. };
  54. #endif