bsd-user: Sync fork_start/fork_end with linux-user
authorJessica Clarke <jrtc27@jrtc27.com>
Wed, 19 Jun 2024 19:03:44 +0000 (20:03 +0100)
committerWarner Losh <imp@bsdimp.com>
Tue, 23 Jul 2024 16:56:25 +0000 (10:56 -0600)
commit5b6828d194fba3c170a5f717cc1fc3d35645aadd
tree199669a1a4431670ddcb61d4ac35c64d5c40b28f
parentb314fd06cf2e55c6cbdda753faeda0c453ee2629
bsd-user: Sync fork_start/fork_end with linux-user

This reorders some of the calls, deduplicates code between branches and,
most importantly, fixes a double end_exclusive call in the parent that
will cause exclusive_context_count to go negative.

Signed-off-by: Jessica Clarke <jrtc27@jrtc27.com>
Pull-Request: https://github.com/qemu-bsd-user/qemu-bsd-user/pull/52
Reviewed-by: Warner Losh <imp@bsdimp.com>
Signed-off-by: Warner Losh <imp@bsdimp.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
bsd-user/main.c