162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci *  S390 version
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci *  Derived from "include/asm-i386/ucontext.h"
662306a36Sopenharmony_ci */
762306a36Sopenharmony_ci
862306a36Sopenharmony_ci#ifndef _ASM_S390_UCONTEXT_H
962306a36Sopenharmony_ci#define _ASM_S390_UCONTEXT_H
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ci#define UC_GPRS_HIGH	1	/* uc_mcontext_ext has valid high gprs */
1262306a36Sopenharmony_ci#define UC_VXRS		2	/* uc_mcontext_ext has valid vector regs */
1362306a36Sopenharmony_ci
1462306a36Sopenharmony_ci/*
1562306a36Sopenharmony_ci * The struct ucontext_extended describes how the registers are stored
1662306a36Sopenharmony_ci * on a rt signal frame. Please note that the structure is not fixed,
1762306a36Sopenharmony_ci * if new CPU registers are added to the user state the size of the
1862306a36Sopenharmony_ci * struct ucontext_extended will increase.
1962306a36Sopenharmony_ci */
2062306a36Sopenharmony_cistruct ucontext_extended {
2162306a36Sopenharmony_ci	unsigned long	  uc_flags;
2262306a36Sopenharmony_ci	struct ucontext  *uc_link;
2362306a36Sopenharmony_ci	stack_t		  uc_stack;
2462306a36Sopenharmony_ci	_sigregs	  uc_mcontext;
2562306a36Sopenharmony_ci	sigset_t	  uc_sigmask;
2662306a36Sopenharmony_ci	/* Allow for uc_sigmask growth.  Glibc uses a 1024-bit sigset_t.  */
2762306a36Sopenharmony_ci	unsigned char	  __unused[128 - sizeof(sigset_t)];
2862306a36Sopenharmony_ci	_sigregs_ext	  uc_mcontext_ext;
2962306a36Sopenharmony_ci};
3062306a36Sopenharmony_ci
3162306a36Sopenharmony_cistruct ucontext {
3262306a36Sopenharmony_ci	unsigned long	  uc_flags;
3362306a36Sopenharmony_ci	struct ucontext  *uc_link;
3462306a36Sopenharmony_ci	stack_t		  uc_stack;
3562306a36Sopenharmony_ci	_sigregs          uc_mcontext;
3662306a36Sopenharmony_ci	sigset_t	  uc_sigmask;
3762306a36Sopenharmony_ci	/* Allow for uc_sigmask growth.  Glibc uses a 1024-bit sigset_t.  */
3862306a36Sopenharmony_ci	unsigned char	  __unused[128 - sizeof(sigset_t)];
3962306a36Sopenharmony_ci};
4062306a36Sopenharmony_ci
4162306a36Sopenharmony_ci#endif /* !_ASM_S390_UCONTEXT_H */
42