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>
Showing
- linux-user/host/aarch64/hostdep.h 0 additions, 20 deletionslinux-user/host/aarch64/hostdep.h
- linux-user/host/arm/hostdep.h 0 additions, 20 deletionslinux-user/host/arm/hostdep.h
- linux-user/host/i386/hostdep.h 0 additions, 20 deletionslinux-user/host/i386/hostdep.h
- linux-user/host/ppc64/hostdep.h 0 additions, 20 deletionslinux-user/host/ppc64/hostdep.h
- linux-user/host/riscv/hostdep.h 0 additions, 20 deletionslinux-user/host/riscv/hostdep.h
- linux-user/host/s390x/hostdep.h 0 additions, 20 deletionslinux-user/host/s390x/hostdep.h
- linux-user/host/x86_64/hostdep.h 0 additions, 20 deletionslinux-user/host/x86_64/hostdep.h
- linux-user/safe-syscall.h 3 additions, 0 deletionslinux-user/safe-syscall.h
- linux-user/signal.c 12 additions, 3 deletionslinux-user/signal.c
Loading
Please register or sign in to comment