1 /* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ 2 /* 3 * Copyright (C) 2012 Regents of the University of California 4 */ 5 6 #ifndef _UAPI_ASM_RISCV_SIGCONTEXT_H 7 #define _UAPI_ASM_RISCV_SIGCONTEXT_H 8 9 #include <asm/ptrace.h> 10 11 /* The Magic number for signal context frame header. */ 12 #define RISCV_V_MAGIC 0x53465457 13 #define END_MAGIC 0x0 14 15 /* The size of END signal context header. */ 16 #define END_HDR_SIZE 0x0 17 18 struct __sc_riscv_v_state { 19 struct __riscv_v_ext_state v_state; 20 } __attribute__((aligned(16))); 21 22 /* 23 * Signal context structure 24 * 25 * This contains the context saved before a signal handler is invoked; 26 * it is restored by sys_sigreturn / sys_rt_sigreturn. 27 */ 28 struct sigcontext { 29 struct user_regs_struct sc_regs; 30 union { 31 union __riscv_fp_state sc_fpregs; 32 struct __riscv_extra_ext_header sc_extdesc; 33 }; 34 }; 35 36 #endif /* _UAPI_ASM_RISCV_SIGCONTEXT_H */ 37