[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/3] util/main-loop: Introduce the main loop into QOM
From: |
Nicolas Saenz Julienne |
Subject: |
Re: [PATCH 2/3] util/main-loop: Introduce the main loop into QOM |
Date: |
Mon, 28 Feb 2022 20:12:43 +0100 |
User-agent: |
Evolution 3.42.4 (3.42.4-1.fc35) |
On Thu, 2022-02-24 at 10:01 +0000, Stefan Hajnoczi wrote:
> On Mon, Feb 21, 2022 at 06:08:44PM +0100, Nicolas Saenz Julienne wrote:
> > diff --git a/include/qemu/main-loop.h b/include/qemu/main-loop.h
> > index 8dbc6fcb89..fea5a3e9d4 100644
> > --- a/include/qemu/main-loop.h
> > +++ b/include/qemu/main-loop.h
> > @@ -26,9 +26,20 @@
> > #define QEMU_MAIN_LOOP_H
> >
> > #include "block/aio.h"
> > +#include "qom/object.h"
> > +#include "util/event-loop.h"
> >
> > #define SIG_IPI SIGUSR1
> >
> > +#define TYPE_MAIN_LOOP "main-loop"
> > +
> > +struct MainLoop {
> > + EventLoopBackend parent_obj;
> > +};
> > +typedef struct MainLoop MainLoop;
> > +
> > +DECLARE_INSTANCE_CHECKER(MainLoop, MAIN_LOOP, TYPE_MAIN_LOOP)
>
> * Direct usage of this macro should be avoided, and the complete
> * OBJECT_DECLARE_TYPE macro is recommended instead.
>
> Is there a reason for using DECLARE_INSTANCE_CHECKER() instead of
> OBJECT_DECLARE_TYPE()?
No, bad copying on my part, I'll change it.
[...]
> > diff --git a/qga/meson.build b/qga/meson.build
> > index 1ee9dca60b..3051473e04 100644
> > --- a/qga/meson.build
> > +++ b/qga/meson.build
> > @@ -52,7 +52,7 @@ qga_ss = qga_ss.apply(config_host, strict: false)
> >
> > qga = executable('qemu-ga', qga_ss.sources(),
> > link_args: config_host['LIBS_QGA'].split(),
> > - dependencies: [qemuutil, libudev],
> > + dependencies: [qemuutil, libudev, qom],
>
> Looks like a change because the first patch added the base class to qom
> instead of qemuutil. Maybe this can be undone if the base class is added
> to qemuutil instead.
I'm looking into it.
--
Nicolás Sáenz