diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/s390/sys/ucontext.h')
-rw-r--r-- | sysdeps/unix/sysv/linux/s390/sys/ucontext.h | 37 |
1 files changed, 24 insertions, 13 deletions
diff --git a/sysdeps/unix/sysv/linux/s390/sys/ucontext.h b/sysdeps/unix/sysv/linux/s390/sys/ucontext.h index 80410fa38c..183da5c8f9 100644 --- a/sysdeps/unix/sysv/linux/s390/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/s390/sys/ucontext.h @@ -26,11 +26,17 @@ #include <bits/types/stack_t.h> +#ifdef __USE_MISC +# define __ctx(fld) fld +#else +# define __ctx(fld) __ ## fld +#endif + /* Type for a program status word. */ typedef struct { - unsigned long mask; - unsigned long addr; + unsigned long __ctx(mask); + unsigned long __ctx(addr); } __attribute__ ((__aligned__(8))) __psw_t; /* Type for a general-purpose register. */ @@ -42,35 +48,40 @@ typedef unsigned long greg_t; that has the same size as s390_regs. This is needed for the elf_prstatus structure. */ #if __WORDSIZE == 64 -# define NGREG 27 +# define __NGREG 27 #else -# define NGREG 36 +# define __NGREG 36 +#endif +#ifdef __USE_MISC +# define NGREG __NGREG #endif /* Must match kernels psw_t alignment. */ -typedef greg_t gregset_t[NGREG] __attribute__ ((__aligned__(8))); +typedef greg_t gregset_t[__NGREG] __attribute__ ((__aligned__(8))); typedef union { - double d; - float f; + double __ctx(d); + float __ctx(f); } fpreg_t; /* Register set for the floating-point registers. */ typedef struct { - unsigned int fpc; - fpreg_t fprs[16]; + unsigned int __ctx(fpc); + fpreg_t __ctx(fprs)[16]; } fpregset_t; /* Context to describe whole processor state. */ typedef struct { - __psw_t psw; - unsigned long gregs[16]; - unsigned int aregs[16]; - fpregset_t fpregs; + __psw_t __ctx(psw); + unsigned long __ctx(gregs)[16]; + unsigned int __ctx(aregs)[16]; + fpregset_t __ctx(fpregs); } mcontext_t; +#undef __ctx + /* Userlevel context. */ typedef struct ucontext { |