linux/arch/s390/include/uapi/asm/sigcontext.h
<<
>>
Prefs
   1/*
   2 *  S390 version
   3 *    Copyright IBM Corp. 1999, 2000
   4 */
   5
   6#ifndef _ASM_S390_SIGCONTEXT_H
   7#define _ASM_S390_SIGCONTEXT_H
   8
   9#include <linux/compiler.h>
  10#include <linux/types.h>
  11
  12#define __NUM_GPRS              16
  13#define __NUM_FPRS              16
  14#define __NUM_ACRS              16
  15#define __NUM_VXRS              32
  16#define __NUM_VXRS_LOW          16
  17#define __NUM_VXRS_HIGH         16
  18
  19#ifndef __s390x__
  20
  21/* Has to be at least _NSIG_WORDS from asm/signal.h */
  22#define _SIGCONTEXT_NSIG        64
  23#define _SIGCONTEXT_NSIG_BPW    32
  24/* Size of stack frame allocated when calling signal handler. */
  25#define __SIGNAL_FRAMESIZE      96
  26
  27#else /* __s390x__ */
  28
  29/* Has to be at least _NSIG_WORDS from asm/signal.h */
  30#define _SIGCONTEXT_NSIG        64
  31#define _SIGCONTEXT_NSIG_BPW    64 
  32/* Size of stack frame allocated when calling signal handler. */
  33#define __SIGNAL_FRAMESIZE      160
  34
  35#endif /* __s390x__ */
  36
  37#define _SIGCONTEXT_NSIG_WORDS  (_SIGCONTEXT_NSIG / _SIGCONTEXT_NSIG_BPW)
  38#define _SIGMASK_COPY_SIZE      (sizeof(unsigned long)*_SIGCONTEXT_NSIG_WORDS)
  39
  40typedef struct 
  41{
  42        unsigned long mask;
  43        unsigned long addr;
  44} __attribute__ ((aligned(8))) _psw_t;
  45
  46typedef struct
  47{
  48        _psw_t psw;
  49        unsigned long gprs[__NUM_GPRS];
  50        unsigned int  acrs[__NUM_ACRS];
  51} _s390_regs_common;
  52
  53typedef struct
  54{
  55        unsigned int fpc;
  56        unsigned int pad;
  57        double   fprs[__NUM_FPRS];
  58} _s390_fp_regs;
  59
  60typedef struct
  61{
  62        _s390_regs_common regs;
  63        _s390_fp_regs     fpregs;
  64} _sigregs;
  65
  66typedef struct
  67{
  68#ifndef __s390x__
  69        unsigned long gprs_high[__NUM_GPRS];
  70#endif
  71        unsigned long long vxrs_low[__NUM_VXRS_LOW];
  72        __vector128 vxrs_high[__NUM_VXRS_HIGH];
  73        unsigned char __reserved[128];
  74} _sigregs_ext;
  75
  76struct sigcontext
  77{
  78        unsigned long   oldmask[_SIGCONTEXT_NSIG_WORDS];
  79        _sigregs        __user *sregs;
  80};
  81
  82
  83#endif
  84
  85