Path: blob/master/arch/mips/include/uapi/asm/ucontext.h
26495 views
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */1#ifndef __MIPS_UAPI_ASM_UCONTEXT_H2#define __MIPS_UAPI_ASM_UCONTEXT_H34/**5* struct extcontext - extended context header structure6* @magic: magic value identifying the type of extended context7* @size: the size in bytes of the enclosing structure8*9* Extended context structures provide context which does not fit within struct10* sigcontext. They are placed sequentially in memory at the end of struct11* ucontext and struct sigframe, with each extended context structure beginning12* with a header defined by this struct. The type of context represented is13* indicated by the magic field. Userland may check each extended context14* structure against magic values that it recognises. The size field allows any15* unrecognised context to be skipped, allowing for future expansion. The end16* of the extended context data is indicated by the magic value17* END_EXTCONTEXT_MAGIC.18*/19struct extcontext {20unsigned int magic;21unsigned int size;22};2324/**25* struct msa_extcontext - MSA extended context structure26* @ext: the extended context header, with magic == MSA_EXTCONTEXT_MAGIC27* @wr: the most significant 64 bits of each MSA vector register28* @csr: the value of the MSA control & status register29*30* If MSA context is live for a task at the time a signal is delivered to it,31* this structure will hold the MSA context of the task as it was prior to the32* signal delivery.33*/34struct msa_extcontext {35struct extcontext ext;36#define MSA_EXTCONTEXT_MAGIC 0x784d5341 /* xMSA */3738unsigned long long wr[32];39unsigned int csr;40};4142#define END_EXTCONTEXT_MAGIC 0x78454e44 /* xEND */4344/**45* struct ucontext - user context structure46* @uc_flags:47* @uc_link:48* @uc_stack:49* @uc_mcontext: holds basic processor state50* @uc_sigmask:51* @uc_extcontext: holds extended processor state52*/53struct ucontext {54/* Historic fields matching asm-generic */55unsigned long uc_flags;56struct ucontext *uc_link;57stack_t uc_stack;58struct sigcontext uc_mcontext;59sigset_t uc_sigmask;6061/* Extended context structures may follow ucontext */62unsigned long long uc_extcontext[];63};6465#endif /* __MIPS_UAPI_ASM_UCONTEXT_H */666768