qemu-e2k/ui
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
..
icons
keycodemapdb@d21009b1c9
shader
clipboard.c ui/clipboard: fix use-after-free regression 2022-03-04 11:29:34 +01:00
cocoa.m ui/cocoa: Run qemu_init in the main thread 2022-09-23 14:36:33 +02:00
console-gl.c ui/console: fix texture leak when calling surface_gl_create_texture() 2022-03-04 11:28:37 +01:00
console.c ui/console: Get tab completion working again in the SDL monitor vc 2022-09-23 13:42:09 +02:00
curses.c
curses_keys.h
cursor.c ui/cursor: fix integer overflow in cursor_alloc (CVE-2021-4206) 2022-04-07 12:30:54 +02:00
cursor_hidden.xpm
cursor_left_ptr.xpm
dbus-chardev.c ui/dbus: add chardev backend & interface 2021-12-21 10:50:22 +04:00
dbus-clipboard.c ui/dbus: add clipboard interface 2021-12-21 10:50:22 +04:00
dbus-console.c ui/dbus: associate the DBusDisplayConsole listener with the given console 2022-03-14 15:16:08 +04:00
dbus-display1.xml ui/dbus: add chardev backend & interface 2021-12-21 10:50:22 +04:00
dbus-error.c ui: add a D-Bus display backend 2021-12-21 10:50:22 +04:00
dbus-listener.c ui/dbus: do not send 2d scanout until gfx_update 2022-03-15 12:54:59 +04:00
dbus-module.c ui/dbus: add p2p=on/off option 2021-12-21 10:50:22 +04:00
dbus.c dbus-display: fix test race when initializing p2p connection 2022-07-19 14:35:00 +02:00
dbus.h Clean up ill-advised or unusual header guards 2022-05-11 16:50:01 +02:00
egl-context.c ui: split the GL context in a different object 2021-12-21 10:50:21 +04:00
egl-headless.c ui/console: egl-headless is compatible with non-gl listeners 2022-03-14 15:16:05 +04:00
egl-helpers.c
gtk-clipboard.c Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
gtk-egl.c ui: Deliver refresh rate via QemuUIInfo 2022-06-14 10:34:37 +02:00
gtk-gl-area.c ui: Deliver refresh rate via QemuUIInfo 2022-06-14 10:34:37 +02:00
gtk.c gtk: Add show_tabs=on|off command line option. 2022-07-19 14:36:42 +02:00
input-barrier.c
input-barrier.h
input-keymap.c
input-legacy.c ui/input-legacy: pass horizontal scroll information 2022-01-13 15:33:18 +01:00
input-linux.c ui: replace qemu_set_nonblock() 2022-05-03 15:52:37 +04:00
input.c Trivial: 3 char repeat typos 2022-06-28 11:06:02 +02:00
kbd-state.c
keymaps.c Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
keymaps.h
meson.build ui: dbus-display requires CONFIG_GBM 2022-07-28 13:08:29 +02:00
qemu-pixman.c
qemu-x509.h
qemu.desktop
sdl2-2d.c
sdl2-gl.c ui: split the GL context in a different object 2021-12-21 10:50:21 +04:00
sdl2-input.c
sdl2.c ui: Switch "-display sdl" to use the QAPI parser 2022-06-03 08:03:28 +02:00
shader.c ui/shader: free associated programs 2022-03-14 15:16:16 +04:00
spice-app.c
spice-core.c ui: move qemu_spice_fill_device_address to ui/util.c 2021-12-21 10:50:21 +04:00
spice-display.c ui/console: move dcl compatiblity check to a callback 2022-03-14 15:16:01 +04:00
spice-input.c
spice-module.c
trace-events ui/gtk-gl-area: create the requested GL context version 2022-06-14 10:34:36 +02:00
trace.h
udmabuf.c
util.c ui: move qemu_spice_fill_device_address to ui/util.c 2021-12-21 10:50:21 +04:00
vdagent.c trivial: Fix duplicated words 2022-08-01 11:58:02 +02:00
vgafont.h
vnc-auth-sasl.c
vnc-auth-sasl.h
vnc-auth-vencrypt.c
vnc-auth-vencrypt.h
vnc-clipboard.c Remove qemu-common.h include from most units 2022-04-06 14:31:55 +02:00
vnc-enc-hextile-template.h
vnc-enc-hextile.c
vnc-enc-tight.c Replacing CONFIG_VNC_PNG with CONFIG_PNG 2022-04-27 07:50:28 +02:00
vnc-enc-tight.h
vnc-enc-zlib.c
vnc-enc-zrle.c
vnc-enc-zrle.c.inc
vnc-enc-zrle.h
vnc-enc-zywrle-template.c
vnc-enc-zywrle.h
vnc-jobs.c
vnc-jobs.h
vnc-palette.c
vnc-palette.h
vnc-stubs.c
vnc-ws.c
vnc-ws.h
vnc.c vnc: add display-update monitor command. 2022-04-27 10:49:28 -07:00
vnc.h Replacing CONFIG_VNC_PNG with CONFIG_PNG 2022-04-27 07:50:28 +02:00
vnc_keysym.h
win32-kbd-hook.c
x_keymap.c
x_keymap.h