[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2] libxl_qmp: wait for completion of device removal
On Mon, Aug 05, 2019 at 03:46:35PM +0100, Ian Jackson wrote: > From bff0b5dfb692546a12e1f3e124b6691955560112 Mon Sep 17 00:00:00 2001 > From: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> > Date: Mon, 5 Aug 2019 15:44:46 +0100 > Subject: [PATCH RFC]: tools: libxl_qmp: Deprecate synchronous interface > > Currently it is not always possible to use the asynchronous interface > because the two qmp connection structs libxl__ev_qmp and > libxl__qmp_handler are different and incompatible. > > Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> > --- > tools/libxl/libxl_qmp.c | 16 +++++++++++----- > 1 file changed, 11 insertions(+), 5 deletions(-) > > diff --git a/tools/libxl/libxl_qmp.c b/tools/libxl/libxl_qmp.c > index 9c4480a2b1..c0667a1520 100644 > --- a/tools/libxl/libxl_qmp.c > +++ b/tools/libxl/libxl_qmp.c > @@ -23,17 +23,23 @@ > > /* > * Logic used to send command to QEMU > + */ > + > +/* > + * *DEPRECATED* No new calls to these function should be introduced, > + * ideally. Instead, where possible, use the asynchronous calls, see > + * "QMP asynchronous calls" in libxl_internal.h. > * > - * qmp_open(): > + * qmp_open(): *DEPRECATED* > * Will open a socket and connect to QEMU. > * > - * qmp_next(): > + * qmp_next(): *DEPRECATED* > * Will read data sent by QEMU and then call qmp_handle_response() once a > * complete QMP message is received. > * The function return on timeout/error or once every data received as been > * processed. > * > - * qmp_handle_response() > + * qmp_handle_response() *DEPRECATED* > * This process json messages received from QEMU and update different list > and > * may call callback function. > * `libxl__qmp_handler.wait_for_id` is reset once a message with this ID is > @@ -42,12 +48,12 @@ > * optional assotiated callback function. The return value of a callback > is > * set in context. > * > - * qmp_send(): > + * qmp_send(): *DEPRECATED* > * Simply prepare a QMP command and send it to QEMU. > * It also add a `struct callback_id_pair` on the > * `libxl__qmp_handler.callback_list` via qmp_send_prepare(). > * > - * qmp_synchronous_send(): > + * qmp_synchronous_send(): *DEPRECATED* > * This function calls qmp_send(), then wait for QEMU to reply to the > command. > * The wait is done by calling qmp_next() over and over again until either > * there is a response for the command or there is an error. Looks fine, but maybe you would like to add some more "deprecated" in libxl_internal.h, for the type `libxl__qmp_handler' and the function libxl__qmp_initialize() and libxl__qmp_close(). -- Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |