diff options
author | Nicolas Saenz Julienne <nsaenzju@redhat.com> | 2022-04-25 09:57:22 +0200 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2022-05-09 10:43:23 +0100 |
commit | 70ac26b9e5ca8374bb3ef3f30b871726673c9f27 (patch) | |
tree | 5bd929a72c3e414ab5323da317ef3895cb2c2fbb /qapi/qom.json | |
parent | 7d5983e3c8c40b1d0668faba31d79905c4fadd7d (diff) |
util/main-loop: Introduce the main loop into QOM
'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.
[1] For example:
-object main-loop,id=main-loop,aio-max-batch=<value>
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-3-nsaenzju@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'qapi/qom.json')
-rw-r--r-- | qapi/qom.json | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/qapi/qom.json b/qapi/qom.json index a2439533c5..7d4a2ac1b9 100644 --- a/qapi/qom.json +++ b/qapi/qom.json @@ -541,6 +541,17 @@ '*poll-shrink': 'int' } } ## +# @MainLoopProperties: +# +# Properties for the main-loop object. +# +# Since: 7.1 +## +{ 'struct': 'MainLoopProperties', + 'base': 'EventLoopBaseProperties', + 'data': {} } + +## # @MemoryBackendProperties: # # Properties for objects of classes derived from memory-backend. @@ -830,6 +841,7 @@ { 'name': 'input-linux', 'if': 'CONFIG_LINUX' }, 'iothread', + 'main-loop', { 'name': 'memory-backend-epc', 'if': 'CONFIG_LINUX' }, 'memory-backend-file', @@ -895,6 +907,7 @@ 'input-linux': { 'type': 'InputLinuxProperties', 'if': 'CONFIG_LINUX' }, 'iothread': 'IothreadProperties', + 'main-loop': 'MainLoopProperties', 'memory-backend-epc': { 'type': 'MemoryBackendEpcProperties', 'if': 'CONFIG_LINUX' }, 'memory-backend-file': 'MemoryBackendFileProperties', |