diff options
author | Warner Losh <imp@bsdimp.com> | 2022-01-19 11:46:05 -0700 |
---|---|---|
committer | Warner Losh <imp@bsdimp.com> | 2022-01-28 15:52:38 -0700 |
commit | 2373a62ae9600aef57923fdba0518e916cc8d28c (patch) | |
tree | 848b37ec8653de4e3af554df9fb386c243e83f12 /bsd-user/x86_64 | |
parent | 4550c661bfa3fd4aba2d5dec7b732546124d8958 (diff) |
bsd-user: Create setup_sigframe_arch to setup sigframe context
Define setup_sigframe_arch whose job it is to setup the mcontext for the
sigframe. Implement for x86 to just call mcontext.
Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'bsd-user/x86_64')
-rw-r--r-- | bsd-user/x86_64/signal.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/bsd-user/x86_64/signal.c b/bsd-user/x86_64/signal.c index 8885152a7d..c3875bc4c6 100644 --- a/bsd-user/x86_64/signal.c +++ b/bsd-user/x86_64/signal.c @@ -30,6 +30,19 @@ abi_long set_sigtramp_args(CPUX86State *regs, return 0; } +/* + * Compare to amd64/amd64/exec_machdep.c sendsig() + * Assumes that the memory is locked if frame points to user memory. + */ +abi_long setup_sigframe_arch(CPUX86State *env, abi_ulong frame_addr, + struct target_sigframe *frame, int flags) +{ + target_mcontext_t *mcp = &frame->sf_uc.uc_mcontext; + + get_mcontext(env, mcp, flags); + return 0; +} + /* Compare to amd64/amd64/machdep.c get_mcontext() */ abi_long get_mcontext(CPUX86State *regs, target_mcontext_t *mcp, int flags) |