qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 3/4] util/main-loop: Introduce the main loop into QOM


From: Stefan Hajnoczi
Subject: Re: [PATCH v2 3/4] util/main-loop: Introduce the main loop into QOM
Date: Thu, 10 Mar 2022 10:27:06 +0000

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 <nsaenzju@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 <stefanha@redhat.com>

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]