qemu-e2k/softmmu
Akihiko Odaki bab6a301c5 ui/cocoa: Run qemu_init in the main thread
This work is based on:
https://patchew.org/QEMU/20220317125534.38706-1-philippe.mathieu.daude@gmail.com/

Simplify the initialization dance by running qemu_init() in the main
thread before the Cocoa event loop starts. The secondary thread only
runs only qemu_main_loop() and qemu_cleanup().

This fixes a case where addRemovableDevicesMenuItems() calls
qmp_query_block() while expecting the main thread to still hold
the BQL.

Overriding the code after calling qemu_init() is done by dynamically
replacing a function pointer variable, qemu_main when initializing
ui/cocoa, which unifies the static implementation of main() for
builds with ui/cocoa and ones without ui/cocoa.

Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com>
Message-Id: <20220819132756.74641-2-akihiko.odaki@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2022-09-23 14:36:33 +02:00
..
arch_init.c
balloon.c
bootdevice.c
cpu-throttle.c
cpu-timers.c
cpus.c
datadir.c meson: Prefix each element of firmware path 2022-07-13 16:58:57 +02:00
device_tree.c
dirtylimit.c softmmu/dirtylimit: Implement dirty page rate limit 2022-07-20 12:15:08 +01:00
dma-helpers.c
globals.c
icount.c
ioport.c
main.c ui/cocoa: Run qemu_init in the main thread 2022-09-23 14:36:33 +02:00
memory_mapping.c
memory.c
meson.build softmmu/dirtylimit: Implement vCPU dirtyrate calculation periodically 2022-07-20 12:15:08 +01:00
physmem.c accel/tcg: Move qemu_ram_addr_from_host_nofail to physmem.c 2022-09-06 08:04:26 +01:00
qdev-monitor.c
qemu-seccomp.c
qtest.c
rtc.c
runstate-action.c
runstate.c qapi: Add exit-failure PanicAction 2022-07-29 09:48:01 +01:00
timers-state.h
tpm.c
trace-events softmmu/dirtylimit: Implement virtual CPU throttle 2022-07-20 12:15:08 +01:00
trace.h
vl.c ui/cocoa: Run qemu_init in the main thread 2022-09-23 14:36:33 +02:00