From 22676a3a6e4d99e13ee75c1ad2f4976ae6b0ce52 Mon Sep 17 00:00:00 2001 From: Damien Zammit Date: Thu, 8 Sep 2022 09:32:52 +0000 Subject: machdev, pci-arbiter, rumpdisk: Fix race condition in bootstrap This fixes a known race condition in bootstrapping by separating the fsys_startup call from the server demuxer loop into two separate functions that the caller can decide when to call. Message-Id: <20220908093229.499494-1-damien@zamaudio.com> --- libmachdev/machdev.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libmachdev/machdev.h') diff --git a/libmachdev/machdev.h b/libmachdev/machdev.h index e1833cff..50bfd41b 100644 --- a/libmachdev/machdev.h +++ b/libmachdev/machdev.h @@ -37,7 +37,8 @@ void * machdev_server(void *); error_t machdev_create_device_port (size_t size, void *result); int machdev_trivfs_init(int argc, char **argv, mach_port_t bootstrap_resume_task, const char *name, const char *path, mach_port_t *bootstrap); int machdev_demuxer(mach_msg_header_t *inp, mach_msg_header_t *outp); -void machdev_trivfs_server(mach_port_t bootstrap); +void machdev_trivfs_server_startup(mach_port_t bootstrap); +void * machdev_trivfs_server_loop(void *); boolean_t machdev_is_master_device (mach_port_t port); #endif -- cgit v1.2.3