From 4edc98fcc8c8124a2e345144a75e1b33dac7632c Mon Sep 17 00:00:00 2001 From: Ilya Leoshkevich Date: Tue, 5 Mar 2024 12:09:42 +0000 Subject: {linux,bsd}-user: Pass pid to fork_end() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The upcoming follow-fork-mode child support requires knowing the child pid. Pass it down. Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson Signed-off-by: Ilya Leoshkevich Message-Id: <20240219141628.246823-6-iii@linux.ibm.com> Signed-off-by: Alex Bennée Message-Id: <20240305121005.3528075-7-alex.bennee@linaro.org> --- bsd-user/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bsd-user/main.c') diff --git a/bsd-user/main.c b/bsd-user/main.c index 517c6b3..fca9b30 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; /* -- cgit v1.1