[PATCH 3/4] chardev/char-fe: Document FEWatchFunc typedef

Philippe Mathieu-Daudé posted 4 patches 2 years, 7 months ago
Maintainers: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>, Alistair Francis <alistair@alistair23.me>, Peter Maydell <peter.maydell@linaro.org>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Joel Stanley <joel@jms.id.au>, "Michael S. Tsirkin" <mst@redhat.com>, Laurent Vivier <lvivier@redhat.com>, Amit Shah <amit@kernel.org>, Gerd Hoffmann <kraxel@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, "Dr. David Alan Gilbert" <dave@treblig.org>, Markus Armbruster <armbru@redhat.com>, Jason Wang <jasowang@redhat.com>
[PATCH 3/4] chardev/char-fe: Document FEWatchFunc typedef
Posted by Philippe Mathieu-Daudé 2 years, 7 months ago
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 include/chardev/char-fe.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/include/chardev/char-fe.h b/include/chardev/char-fe.h
index 309960046a..ec3f706a14 100644
--- a/include/chardev/char-fe.h
+++ b/include/chardev/char-fe.h
@@ -175,6 +175,20 @@ void qemu_chr_fe_printf(CharBackend *be, const char *fmt, ...)
     G_GNUC_PRINTF(2, 3);
 
 
+/**
+ * FEWatchFunc: a #GSourceFunc called when any conditions requested by
+ *              qemu_chr_fe_add_watch() is satisfied.
+ * @do_not_use: depending on the underlying chardev, a GIOChannel or a
+ *              QIOChannel. DO NOT USE!
+ * @cond: bitwise combination of conditions watched and satisfied
+ *              before calling this callback.
+ * @data: user data passed at creation to qemu_chr_fe_add_watch(). Can
+ *              be NULL.
+ *
+ * Returns: G_SOURCE_REMOVE if the GSource should be removed from the
+ *              main loop, or G_SOURCE_CONTINUE to leave the GSource in
+ *              the main loop.
+ */
 typedef gboolean (*FEWatchFunc)(void *do_not_use, GIOCondition condition, void *data);
 
 /**
-- 
2.38.1


Re: [PATCH 3/4] chardev/char-fe: Document FEWatchFunc typedef
Posted by Marc-André Lureau 2 years, 7 months ago
Hi

On Wed, Jul 5, 2023 at 5:33 PM Philippe Mathieu-Daudé <philmd@linaro.org>
wrote:

> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>  include/chardev/char-fe.h | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
>
> diff --git a/include/chardev/char-fe.h b/include/chardev/char-fe.h
> index 309960046a..ec3f706a14 100644
> --- a/include/chardev/char-fe.h
> +++ b/include/chardev/char-fe.h
> @@ -175,6 +175,20 @@ void qemu_chr_fe_printf(CharBackend *be, const char
> *fmt, ...)
>      G_GNUC_PRINTF(2, 3);
>
>
> +/**
> + * FEWatchFunc: a #GSourceFunc called when any conditions requested by
> + *              qemu_chr_fe_add_watch() is satisfied.
> + * @do_not_use: depending on the underlying chardev, a GIOChannel or a
> + *              QIOChannel. DO NOT USE!
> + * @cond: bitwise combination of conditions watched and satisfied
> + *              before calling this callback.
> + * @data: user data passed at creation to qemu_chr_fe_add_watch(). Can
> + *              be NULL.
> + *
> + * Returns: G_SOURCE_REMOVE if the GSource should be removed from the
> + *              main loop, or G_SOURCE_CONTINUE to leave the GSource in
> + *              the main loop.
> + */
>  typedef gboolean (*FEWatchFunc)(void *do_not_use, GIOCondition condition,
> void *data);
>
>  /**
> --
> 2.38.1
>
>
>
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>

-- 
Marc-André Lureau