Skip to content

Commit

Permalink
bsd-user: Implement host_to_target_siginfo.
Browse files Browse the repository at this point in the history
Used in wait6 system call

Signed-off-by: Stacey Son <[email protected]>
Signed-off-by: Karim Taha <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Reviewed-by: Warner Losh <[email protected]>
Message-Id: <[email protected]>
  • Loading branch information
staceyson authored and bsdimp committed Oct 3, 2023
1 parent d314ae9 commit 3f254cf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions bsd-user/signal-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ int do_sigaction(int sig, const struct target_sigaction *act,
abi_long do_sigaltstack(abi_ulong uss_addr, abi_ulong uoss_addr, abi_ulong sp);
long do_sigreturn(CPUArchState *env, abi_ulong addr);
void force_sig_fault(int sig, int code, abi_ulong addr);
void host_to_target_siginfo(target_siginfo_t *tinfo, const siginfo_t *info);
int host_to_target_signal(int sig);
void host_to_target_sigset(target_sigset_t *d, const sigset_t *s);
void process_pending_signals(CPUArchState *env);
Expand Down
6 changes: 6 additions & 0 deletions bsd-user/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,12 @@ static void tswap_siginfo(target_siginfo_t *tinfo, const target_siginfo_t *info)
}
}

void host_to_target_siginfo(target_siginfo_t *tinfo, const siginfo_t *info)
{
host_to_target_siginfo_noswap(tinfo, info);
tswap_siginfo(tinfo, tinfo);
}

int block_signals(void)
{
TaskState *ts = (TaskState *)thread_cpu->opaque;
Expand Down

0 comments on commit 3f254cf

Please sign in to comment.