On Thu, Mar 03, 2022 at 03:58:21PM +0100, Nicolas Saenz Julienne wrote: > 'event-loop-base' provides basic property handling for all 'AioContext' > based event loops. So let's define a new 'MainLoopClass' that inherits > from it. This will permit tweaking the main loop's properties through > qapi as well as through the command line using the '-object' keyword[1]. > Only one instance of 'MainLoopClass' might be created at any time. > > 'EventLoopBaseClass' learns a new callback, 'can_be_deleted()' so as to > mark 'MainLoop' as non-deletable. > > Signed-off-by: Nicolas Saenz Julienne <nsaen...@redhat.com> > > [1] For example: > -object main-loop,id=main-loop,aio-max-batch=<value> > --- > > Changes since v1: > - Fix json files to differentiate between iothread and main-loop > - Use OBJECT_DECLARE_TYPE() > - Fix build dependencies > > event-loop-base.c | 13 ++++++++ > include/qemu/main-loop.h | 10 ++++++ > include/sysemu/event-loop-base.h | 1 + > meson.build | 3 +- > qapi/qom.json | 16 +++++++++ > util/main-loop.c | 56 ++++++++++++++++++++++++++++++++ > 6 files changed, 98 insertions(+), 1 deletion(-)
Reviewed-by: Stefan Hajnoczi <stefa...@redhat.com>
signature.asc
Description: PGP signature