OSDN Git Service

hmp: Add support for coroutine command handlers
authorKevin Wolf <kwolf@redhat.com>
Mon, 5 Oct 2020 15:58:51 +0000 (17:58 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Fri, 9 Oct 2020 05:08:20 +0000 (07:08 +0200)
commitbb4b9ead95c3aaca84823e28dd9f11ccaa875c14
treefd17d7da1941f5b0514dca6a8987cbee6ee9770d
parent9ce44e2ce267caf5559904a201aa1986b0a8326b
hmp: Add support for coroutine command handlers

Often, QMP command handlers are not only called to handle QMP commands,
but also from a corresponding HMP command handler. In order to give them
a consistent environment, optionally run HMP command handlers in a
coroutine, too.

The implementation is a lot simpler than in QMP because for HMP, we
still block the VM while the coroutine is running.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20201005155855.256490-11-kwolf@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
docs/devel/qapi-code-gen.txt
monitor/hmp.c
monitor/monitor-internal.h