aboutsummaryrefslogtreecommitdiff
path: root/linux-user/syscall_defs.h
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2021-04-22 16:02:26 -0700
committerLaurent Vivier <laurent@vivier.eu>2021-05-18 07:10:46 +0200
commit02d0de101c797d14115629818823c0e062c64d26 (patch)
treef18d138947117e1d16a7c4c4ad7d38bf981c9b4e /linux-user/syscall_defs.h
parent0f6f99032e495b28b8d455144610c5a84a7067d8 (diff)
linux-user/alpha: Share code for TARGET_NR_sigaction
There's no longer a difference between the alpha code and the generic code. There is a type difference in target_old_sigaction.sa_flags, which can be resolved with a very much smaller ifdef, which allows us to finish sharing the target_sigaction definition. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20210422230227.314751-7-richard.henderson@linaro.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'linux-user/syscall_defs.h')
-rw-r--r--linux-user/syscall_defs.h21
1 files changed, 6 insertions, 15 deletions
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index 7a1d3b239c..18b031a2f6 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -501,21 +501,12 @@ int do_sigaction(int sig, const struct target_sigaction *act,
#endif
#if defined(TARGET_ALPHA)
-struct target_old_sigaction {
- abi_ulong _sa_handler;
- abi_ulong sa_mask;
- int32_t sa_flags;
-};
+typedef int32_t target_old_sa_flags;
+#else
+typedef abi_ulong target_old_sa_flags;
+#endif
-/* This is the struct used inside the kernel. The ka_restorer
- field comes from the 5th argument to sys_rt_sigaction. */
-struct target_sigaction {
- abi_ulong _sa_handler;
- abi_ulong sa_flags;
- target_sigset_t sa_mask;
- abi_ulong ka_restorer;
-};
-#elif defined(TARGET_MIPS)
+#if defined(TARGET_MIPS)
struct target_sigaction {
uint32_t sa_flags;
#if defined(TARGET_ABI_MIPSN32)
@@ -533,7 +524,7 @@ struct target_sigaction {
struct target_old_sigaction {
abi_ulong _sa_handler;
abi_ulong sa_mask;
- abi_ulong sa_flags;
+ target_old_sa_flags sa_flags;
#ifdef TARGET_ARCH_HAS_SA_RESTORER
abi_ulong sa_restorer;
#endif