]> git.proxmox.com Git - mirror_qemu.git/commit
Introduce event-loop-base abstract class
authorNicolas Saenz Julienne <nsaenzju@redhat.com>
Mon, 25 Apr 2022 07:57:21 +0000 (09:57 +0200)
committerStefan Hajnoczi <stefanha@redhat.com>
Mon, 9 May 2022 09:43:23 +0000 (10:43 +0100)
commit7d5983e3c8c40b1d0668faba31d79905c4fadd7d
tree017a76e3acca6dda6d1b9089e9dcd5a5c0f4942d
parent554623226f800acf48a2ed568900c1c968ec9a8b
Introduce event-loop-base abstract class

Introduce the 'event-loop-base' abstract class, it'll hold the
properties common to all event loops and provide the necessary hooks for
their creation and maintenance. Then have iothread inherit from it.

EventLoopBaseClass is defined as user creatable and provides a hook for
its children to attach themselves to the user creatable class 'complete'
function. It also provides an update_params() callback to propagate
property changes onto its children.

The new 'event-loop-base' class will live in the root directory. It is
built on its own using the 'link_whole' option (there are no direct
function dependencies between the class and its children, it all happens
trough 'constructor' magic). And also imposes new compilation
dependencies:

    qom <- event-loop-base <- blockdev (iothread.c)

And in subsequent patches:

    qom <- event-loop-base <- qemuutil (util/main-loop.c)

All this forced some amount of reordering in meson.build:

 - Moved qom build definition before qemuutil. Doing it the other way
   around (i.e. moving qemuutil after qom) isn't possible as a lot of
   core libraries that live in between the two depend on it.

 - Process the 'hw' subdir earlier, as it introduces files into the
   'qom' source set.

No functional changes intended.

Signed-off-by: Nicolas Saenz Julienne <nsaenzju@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Markus Armbruster <armbru@redhat.com>
Message-id: 20220425075723.20019-2-nsaenzju@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
event-loop-base.c [new file with mode: 0644]
include/sysemu/event-loop-base.h [new file with mode: 0644]
include/sysemu/iothread.h
iothread.c
meson.build
qapi/qom.json