summaryrefslogtreecommitdiffstats
path: root/linux-user/safe-syscall.h
diff options
context:
space:
mode:
authorWarner Losh2021-11-13 05:56:00 +0100
committerRichard Henderson2021-11-23 01:47:20 +0100
commit07637888687bfecf3c0cc8351c5c24f29a611691 (patch)
tree516c155aa936626c6d3dbe0494b1e950974f2ad7 /linux-user/safe-syscall.h
parentlinux-user: Add host_signal_set_pc to set pc in mcontext (diff)
downloadqemu-07637888687bfecf3c0cc8351c5c24f29a611691.tar.gz
qemu-07637888687bfecf3c0cc8351c5c24f29a611691.tar.xz
qemu-07637888687bfecf3c0cc8351c5c24f29a611691.zip
linux-user/signal.c: Create a common rewind_if_in_safe_syscall
All instances of rewind_if_in_safe_syscall are the same, differing only in how the instruction point is fetched from the ucontext and the size of the registers. Use host_signal_pc and new host_signal_set_pc interfaces to fetch the pointer to the PC and adjust if needed. Delete all the old copies of rewind_if_in_safe_syscall. Acked-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-Id: <20211113045603.60391-3-imp@bsdimp.com> [rth: include safe-syscall.h, simplify ifdefs] Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'linux-user/safe-syscall.h')
-rw-r--r--linux-user/safe-syscall.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/linux-user/safe-syscall.h b/linux-user/safe-syscall.h
index 6bc0390262..aaa9ffc0e2 100644
--- a/linux-user/safe-syscall.h
+++ b/linux-user/safe-syscall.h
@@ -127,6 +127,9 @@
#ifdef HAVE_SAFE_SYSCALL
/* The core part of this function is implemented in assembly */
extern long safe_syscall_base(int *pending, long number, ...);
+/* These are defined by the safe-syscall.inc.S file */
+extern char safe_syscall_start[];
+extern char safe_syscall_end[];
#define safe_syscall(...) \
({ \