qemu-e2k/stubs
Emanuele Giuseppe Esposito 6538692e28 main-loop.h: introduce qemu_in_main_thread()
When invoked from the main loop, this function is the same
as qemu_mutex_iothread_locked, and returns true if the BQL is held.
When invoked from iothreads or tests, it returns true only
if the current AioContext is the Main Loop.

This essentially just extends qemu_mutex_iothread_locked to work
also in unit tests or other users like storage-daemon, that run
in the Main Loop but end up using the implementation in
stubs/iothread-lock.c.

Using qemu_mutex_iothread_locked in unit tests defaults to false
because they use the implementation in stubs/iothread-lock,
making all assertions added in next patches fail despite the
AioContext is still the main loop.

See the comment in the function header for more information.

Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Message-Id: <20220303151616.325444-2-eesposit@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2022-03-04 18:18:15 +01:00
..
bdrv-next-monitor-owned.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
blk-commit-all.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
blk-exp-close-all.c block: move block exports to libblockdev 2020-10-23 13:42:16 +01:00
blockdev-close-all-bdrv-states.c all: Clean up includes 2016-02-16 14:29:28 +00:00
change-state-handler.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
cmos.c stubs/cmos: Use correct include 2020-09-01 09:10:58 +02:00
cpu-get-clock.c cpu-timers, icount: new modules 2020-10-05 16:41:22 +02:00
cpu-synchronize-state.c cpus: prepare new CpusAccel cpu accelerator interface 2020-10-05 16:41:22 +02:00
cpus-get-virtual-clock.c cpus: prepare new CpusAccel cpu accelerator interface 2020-10-05 16:41:22 +02:00
dump.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
error-printf.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
fdset.c monitor: simplify functions for getting a dup'd fdset entry 2020-09-16 10:33:48 +01:00
fw_cfg.c hw/nvram/fw_cfg: Add fw_cfg_arch_key_name() 2019-05-23 14:10:31 +02:00
gdbstub.c Clean up includes some more 2016-03-22 22:20:16 +01:00
get-vm-name.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00
icount.c icount: rename functions to be consistent with the module name 2020-10-05 16:41:22 +02:00
io_uring.c stubs: add stubs for io_uring interface 2020-01-30 20:59:41 +00:00
iothread-lock-block.c main-loop.h: introduce qemu_in_main_thread() 2022-03-04 18:18:15 +01:00
iothread-lock.c async: the main AioContext is only "current" if under the BQL 2021-06-18 10:59:52 -05:00
is-daemonized.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
isa-bus.c stubs: add isa_create_simple 2020-07-06 17:01:11 +02:00
linux-aio.c linux-aio: properly bubble up errors from initialization 2018-06-27 13:06:34 +01:00
meson.build main-loop.h: introduce qemu_in_main_thread() 2022-03-04 18:18:15 +01:00
migr-blocker.c Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
module-opts.c modules: use modinfo for qemu opts load 2021-07-09 18:20:27 +02:00
monitor-core.c monitor: Make current monitor a per-coroutine property 2020-10-09 07:08:19 +02:00
monitor.c hmp: Fail gracefully if chardev is already in use 2020-03-06 17:21:28 +01:00
pci-bus.c stubs: add pci_create_simple 2020-07-06 17:01:11 +02:00
qdev.c qapi/qdev.json: add DEVICE_UNPLUG_GUEST_ERROR QAPI event 2021-09-30 12:25:51 +10:00
qemu-timer-notify-cb.c cpu-timers, icount: new modules 2020-10-05 16:41:22 +02:00
qmp-command-available.c remove preconfig state 2020-12-15 12:51:48 -05:00
qmp-quit.c chardev: don't exit() straight away on C-a x 2021-11-04 10:32:01 +00:00
qmp_memory_device.c qom/object: Move Object typedef to 'qemu/typedefs.h' 2020-06-10 12:09:36 -04:00
qtest.c cpu-timers, icount: new modules 2020-10-05 16:41:22 +02:00
ram-block.c util/vfio-helpers.c: Use ram_block_discard_disable() in qemu_vfio_open_pci() 2020-11-16 13:22:17 -05:00
ramfb.c Revert "hw/display/ramfb: initialize fw-config space with xres/ yres" 2020-05-18 15:42:34 +02:00
replay-tools.c replay: fix icount request when replaying clock access 2021-02-16 17:15:39 +01:00
replay.c replay: do not build if TCG is not available 2020-10-22 11:53:54 -04:00
runstate-check.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
semihost.c Do not include sysemu/sysemu.h if it's not really necessary 2021-05-02 17:24:50 +02:00
sysbus.c stubs: Clean up includes 2016-02-04 17:01:04 +00:00
target-get-monitor-def.c Clean up includes some more 2016-03-22 22:20:16 +01:00
target-monitor-defs.c Clean up includes some more 2016-03-22 22:20:16 +01:00
trace-control.c trace: remove global 'uint16 dstate[]' array 2016-10-12 09:35:54 +02:00
usb-dev-stub.c qapi: introduce x-query-usb QMP command 2021-11-02 15:55:14 +00:00
uuid.c qapi: Restrict query-uuid command to machine code 2020-09-29 15:41:35 +02:00
vm-stop.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
vmgenid.c qapi: Restrict query-vm-generation-id command to machine code 2020-09-29 15:41:35 +02:00
vmstate.c cpu: Move CPUClass::vmsd to SysemuCPUOps 2021-05-26 15:33:59 -07:00
win32-kbd-hook.c ui/win32-kbd-hook: handle AltGr in a hook procedure 2020-05-19 09:06:44 +02:00
xen-hw-stub.c stubs/xen-hw-stub: drop xenstore_store_pv_console_info stub 2020-11-16 11:07:53 +00:00