summaryrefslogtreecommitdiff
path: root/arch/riscv64/bits/signal.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/riscv64/bits/signal.h')
-rw-r--r--arch/riscv64/bits/signal.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/arch/riscv64/bits/signal.h b/arch/riscv64/bits/signal.h
index 2ff4be30..6a53feb7 100644
--- a/arch/riscv64/bits/signal.h
+++ b/arch/riscv64/bits/signal.h
@@ -35,6 +35,17 @@ typedef struct mcontext_t {
union __riscv_mc_fp_state __fpregs;
} mcontext_t;
+#if defined(_GNU_SOURCE)
+#define REG_PC 0
+#define REG_RA 1
+#define REG_SP 2
+#define REG_TP 4
+#define REG_S0 8
+#define REG_S1 9
+#define REG_A0 10
+#define REG_S2 18
+#endif
+
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
typedef unsigned long greg_t;
typedef unsigned long gregset_t[32];
@@ -51,10 +62,10 @@ struct sigaltstack {
size_t ss_size;
};
-typedef struct ucontext_t
+typedef struct __ucontext
{
unsigned long uc_flags;
- struct ucontext_t *uc_link;
+ struct __ucontext *uc_link;
stack_t uc_stack;
sigset_t uc_sigmask;
mcontext_t uc_mcontext;
@@ -67,7 +78,6 @@ typedef struct ucontext_t
#define SA_RESTART 0x10000000
#define SA_NODEFER 0x40000000
#define SA_RESETHAND 0x80000000
-#define SA_RESTORER 0x04000000
#endif