From 6fca8abef7e6d7be1a9e6d93dd0f2b7fbc5b28e5 Mon Sep 17 00:00:00 2001 From: Pasha Date: Tue, 20 Feb 2024 18:55:36 +0000 Subject: initial risc-v example --- riscv/include/uapi/asm/sigcontext.h | 40 +++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 riscv/include/uapi/asm/sigcontext.h (limited to 'riscv/include/uapi/asm/sigcontext.h') diff --git a/riscv/include/uapi/asm/sigcontext.h b/riscv/include/uapi/asm/sigcontext.h new file mode 100644 index 0000000..cd4f175 --- /dev/null +++ b/riscv/include/uapi/asm/sigcontext.h @@ -0,0 +1,40 @@ +/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */ +/* + * Copyright (C) 2012 Regents of the University of California + */ + +#ifndef _UAPI_ASM_RISCV_SIGCONTEXT_H +#define _UAPI_ASM_RISCV_SIGCONTEXT_H + +#include + +/* The Magic number for signal context frame header. */ +#define RISCV_V_MAGIC 0x53465457 +#define END_MAGIC 0x0 + +/* The size of END signal context header. */ +#define END_HDR_SIZE 0x0 + +#ifndef __ASSEMBLY__ + +struct __sc_riscv_v_state { + struct __riscv_v_ext_state v_state; +} __attribute__((aligned(16))); + +/* + * Signal context structure + * + * This contains the context saved before a signal handler is invoked; + * it is restored by sys_rt_sigreturn. + */ +struct sigcontext { + struct user_regs_struct sc_regs; + union { + union __riscv_fp_state sc_fpregs; + struct __riscv_extra_ext_header sc_extdesc; + }; +}; + +#endif /*!__ASSEMBLY__*/ + +#endif /* _UAPI_ASM_RISCV_SIGCONTEXT_H */ -- cgit v1.2.1