qemu-riscv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/4] chardev/char-fe: Clarify qemu_chr_fe_add_watch 'conditio


From: Marc-André Lureau
Subject: Re: [PATCH 2/4] chardev/char-fe: Clarify qemu_chr_fe_add_watch 'condition' arg is a mask
Date: Mon, 10 Jul 2023 15:19:53 +0400



On Wed, Jul 5, 2023 at 5:33 PM Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
qemu_chr_fe_add_watch() can poll for multiple conditions.
It's @cond argument is a combination of all the condition bits.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 include/chardev/char-fe.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/chardev/char-fe.h b/include/chardev/char-fe.h
index 8c420fa36e..309960046a 100644
--- a/include/chardev/char-fe.h
+++ b/include/chardev/char-fe.h
@@ -179,8 +179,8 @@ typedef gboolean (*FEWatchFunc)(void *do_not_use, GIOCondition condition, void *

 /**
  * qemu_chr_fe_add_watch:
- * @cond: the condition to poll for
- * @func: the function to call when the condition happens
+ * @cond: bitwise combination of conditions to poll for
+ * @func: the function to call when the conditions are satisfied

Not really worth imo, do you want to also fix all the io/ docs for @condition? and probably elsewhere...

The rewording of @func isn't much clearer either... "any of the conditions"?
 
  * @user_data: the opaque pointer to pass to @func
  *
  * If the backend is connected, create and add a #GSource that fires
--
2.38.1




--
Marc-André Lureau

reply via email to

[Prev in Thread] Current Thread [Next in Thread]