Re: [RFC PATCH v2 01/25] main-loop.h: introduce qemu_in_main_thread()

2021-10-07 Thread Stefan Hajnoczi
On Tue, Oct 05, 2021 at 10:31:51AM -0400, Emanuele Giuseppe Esposito wrote: > 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

[RFC PATCH v2 01/25] main-loop.h: introduce qemu_in_main_thread()

2021-10-05 Thread Emanuele Giuseppe Esposito
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 als