122851890Sopenharmony_ci/****************************************************************************
222851890Sopenharmony_ci ****************************************************************************
322851890Sopenharmony_ci ***
422851890Sopenharmony_ci ***   This header was automatically generated from a Linux kernel header
522851890Sopenharmony_ci ***   of the same name, to make information necessary for userspace to
622851890Sopenharmony_ci ***   call into the kernel available to libc.  It contains only constants,
722851890Sopenharmony_ci ***   structures, and macros generated from the original header, and thus,
822851890Sopenharmony_ci ***   contains no copyrightable information.
922851890Sopenharmony_ci ***
1022851890Sopenharmony_ci ***   To edit the content of this header, modify the corresponding
1122851890Sopenharmony_ci ***   source file (e.g. under external/kernel-headers/original/) then
1222851890Sopenharmony_ci ***   run bionic/libc/kernel/tools/update_all.py
1322851890Sopenharmony_ci ***
1422851890Sopenharmony_ci ***   Any manual change here will be lost the next time this script will
1522851890Sopenharmony_ci ***   be run. You've been warned!
1622851890Sopenharmony_ci ***
1722851890Sopenharmony_ci ****************************************************************************
1822851890Sopenharmony_ci ****************************************************************************/
1922851890Sopenharmony_ci#ifndef __LOONGARCH_UAPI_ASM_UCONTEXT_H
2022851890Sopenharmony_ci#define __LOONGARCH_UAPI_ASM_UCONTEXT_H
2122851890Sopenharmony_ci
2222851890Sopenharmony_ci/**
2322851890Sopenharmony_ci * struct ucontext - user context structure
2422851890Sopenharmony_ci * @uc_flags:
2522851890Sopenharmony_ci * @uc_link:
2622851890Sopenharmony_ci * @uc_stack:
2722851890Sopenharmony_ci * @uc_mcontext:	holds basic processor state
2822851890Sopenharmony_ci * @uc_sigmask:
2922851890Sopenharmony_ci * @uc_extcontext:	holds extended processor state
3022851890Sopenharmony_ci */
3122851890Sopenharmony_cistruct ucontext {
3222851890Sopenharmony_ci	unsigned long		uc_flags;
3322851890Sopenharmony_ci	struct ucontext		*uc_link;
3422851890Sopenharmony_ci	stack_t			uc_stack;
3522851890Sopenharmony_ci	sigset_t		uc_sigmask;
3622851890Sopenharmony_ci	/* There's some padding here to allow sigset_t to be expanded in the
3722851890Sopenharmony_ci	 * future.  Though this is unlikely, other architectures put uc_sigmask
3822851890Sopenharmony_ci	 * at the end of this structure and explicitly state it can be
3922851890Sopenharmony_ci	 * expanded, so we didn't want to box ourselves in here. */
4022851890Sopenharmony_ci	__u8		  __unused[1024 / 8 - sizeof(sigset_t)];
4122851890Sopenharmony_ci	/* We can't put uc_sigmask at the end of this structure because we need
4222851890Sopenharmony_ci	 * to be able to expand sigcontext in the future.  For example, the
4322851890Sopenharmony_ci	 * vector ISA extension will almost certainly add ISA state.  We want
4422851890Sopenharmony_ci	 * to ensure all user-visible ISA state can be saved and restored via a
4522851890Sopenharmony_ci	 * ucontext, so we're putting this at the end in order to allow for
4622851890Sopenharmony_ci	 * infinite extensibility.  Since we know this will be extended and we
4722851890Sopenharmony_ci	 * assume sigset_t won't be extended an extreme amount, we're
4822851890Sopenharmony_ci	 * prioritizing this. */
4922851890Sopenharmony_ci	struct sigcontext	uc_mcontext;
5022851890Sopenharmony_ci};
5122851890Sopenharmony_ci
5222851890Sopenharmony_ci#endif /* __LOONGARCH_UAPI_ASM_UCONTEXT_H */
53