aboutsummaryrefslogtreecommitdiff
path: root/bsd-user/main.c
diff options
context:
space:
mode:
authorIlya Leoshkevich <iii@linux.ibm.com>2024-03-05 12:09:42 +0000
committerAlex Bennée <alex.bennee@linaro.org>2024-03-06 12:35:19 +0000
commit4edc98fcc8c8124a2e345144a75e1b33dac7632c (patch)
tree87c6ae410460575cf92ea62a552302488374eec9 /bsd-user/main.c
parent3d6ed98da82e0bb2384bfbc83fadb518271fdbca (diff)
{linux,bsd}-user: Pass pid to fork_end()
The upcoming follow-fork-mode child support requires knowing the child pid. Pass it down. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Message-Id: <20240219141628.246823-6-iii@linux.ibm.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20240305121005.3528075-7-alex.bennee@linaro.org>
Diffstat (limited to 'bsd-user/main.c')
-rw-r--r--bsd-user/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bsd-user/main.c b/bsd-user/main.c
index 517c6b3ec2..fca9b30204 100644
--- a/bsd-user/main.c
+++ b/bsd-user/main.c
@@ -116,8 +116,10 @@ void fork_start(void)
gdbserver_fork_start();
}
-void fork_end(int child)
+void fork_end(pid_t pid)
{
+ bool child = pid == 0;
+
if (child) {
CPUState *cpu, *next_cpu;
/*