[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 03/28] bsd-user: Implement host_to_target_siginfo.
From: |
Karim Taha |
Subject: |
[PATCH v4 03/28] bsd-user: Implement host_to_target_siginfo. |
Date: |
Mon, 25 Sep 2023 00:01:11 +0300 |
From: Stacey Son <sson@FreeBSD.org>
Used in wait6 system call
Signed-off-by: Stacey Son <sson@FreeBSD.org>
Signed-off-by: Karim Taha <kariem.taha2.7@gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Warner Losh <imp@bsdimp.com>
---
bsd-user/signal-common.h | 1 +
bsd-user/signal.c | 6 ++++++
2 files changed, 7 insertions(+)
diff --git a/bsd-user/signal-common.h b/bsd-user/signal-common.h
index c044e81165..77d7c7a78b 100644
--- a/bsd-user/signal-common.h
+++ b/bsd-user/signal-common.h
@@ -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);
diff --git a/bsd-user/signal.c b/bsd-user/signal.c
index b6beab659e..ea82241b70 100644
--- a/bsd-user/signal.c
+++ b/bsd-user/signal.c
@@ -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;
--
2.42.0
- [PATCH v4 00/28] bsd-user: Implement freebsd process related system calls., Karim Taha, 2023/09/24
- [PATCH v4 01/28] bsd-user: define TARGET_RFSPAWN for rfork to use vfork(2) semantics, and fix RLIM_INFINITY, Karim Taha, 2023/09/24
- [PATCH v4 02/28] bsd-user: Define procctl(2) related structs, Karim Taha, 2023/09/24
- [PATCH v4 03/28] bsd-user: Implement host_to_target_siginfo.,
Karim Taha <=
- [PATCH v4 04/28] bsd-user: Add freebsd_exec_common and do_freebsd_procctl to qemu.h., Karim Taha, 2023/09/24
- [PATCH v4 05/28] bsd-user: add extern declarations for bsd-proc.c conversion functions, Karim Taha, 2023/09/24
- [PATCH v4 06/28] bsd-user: Implement target_to_host_resource conversion function, Karim Taha, 2023/09/24
- [PATCH v4 07/28] bsd-user: Implement target_to_host_rlim and host_to_target_rlim conversion., Karim Taha, 2023/09/24
- [PATCH v4 09/28] bsd-user: Implement host_to_target_waitstatus conversion., Karim Taha, 2023/09/24
- [PATCH v4 08/28] bsd-user: Implement host_to_target_rusage and host_to_target_wrusage., Karim Taha, 2023/09/24
- [PATCH v4 10/28] bsd-user: Get number of cpus., Karim Taha, 2023/09/24
- [PATCH v4 11/28] bsd-user: Implement getgroups(2) and setgroups(2) system calls., Karim Taha, 2023/09/24
- [PATCH v4 12/28] bsd-user: Implement umask(2), setlogin(2) and getlogin(2), Karim Taha, 2023/09/24