Path: blob/master/arch/loongarch/include/uapi/asm/ucontext.h
26512 views
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */1#ifndef __LOONGARCH_UAPI_ASM_UCONTEXT_H2#define __LOONGARCH_UAPI_ASM_UCONTEXT_H34/**5* struct ucontext - user context structure6* @uc_flags:7* @uc_link:8* @uc_stack:9* @uc_mcontext: holds basic processor state10* @uc_sigmask:11* @uc_extcontext: holds extended processor state12*/13struct ucontext {14unsigned long uc_flags;15struct ucontext *uc_link;16stack_t uc_stack;17sigset_t uc_sigmask;18/* There's some padding here to allow sigset_t to be expanded in the19* future. Though this is unlikely, other architectures put uc_sigmask20* at the end of this structure and explicitly state it can be21* expanded, so we didn't want to box ourselves in here. */22__u8 __unused[1024 / 8 - sizeof(sigset_t)];23/* We can't put uc_sigmask at the end of this structure because we need24* to be able to expand sigcontext in the future. For example, the25* vector ISA extension will almost certainly add ISA state. We want26* to ensure all user-visible ISA state can be saved and restored via a27* ucontext, so we're putting this at the end in order to allow for28* infinite extensibility. Since we know this will be extended and we29* assume sigset_t won't be extended an extreme amount, we're30* prioritizing this. */31struct sigcontext uc_mcontext;32};3334#endif /* __LOONGARCH_UAPI_ASM_UCONTEXT_H */353637