[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v5 1/7] chardev: comment details for CLOSED event
From: |
Peter Xu |
Subject: |
[Qemu-devel] [PATCH v5 1/7] chardev: comment details for CLOSED event |
Date: |
Wed, 20 Jun 2018 15:32:17 +0800 |
It was unclear before on what does the CLOSED event mean. Meanwhile we
add a TODO to fix up the CLOSED event in the future when the in/out
ports are different for a chardev.
CC: Paolo Bonzini <address@hidden>
CC: "Marc-André Lureau" <address@hidden>
CC: Stefan Hajnoczi <address@hidden>
CC: Markus Armbruster <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Signed-off-by: Peter Xu <address@hidden>
---
include/chardev/char.h | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/include/chardev/char.h b/include/chardev/char.h
index 04de45795e..6f0576e214 100644
--- a/include/chardev/char.h
+++ b/include/chardev/char.h
@@ -22,7 +22,16 @@ typedef enum {
CHR_EVENT_OPENED, /* new connection established */
CHR_EVENT_MUX_IN, /* mux-focus was set to this terminal */
CHR_EVENT_MUX_OUT, /* mux-focus will move on */
- CHR_EVENT_CLOSED /* connection closed */
+ CHR_EVENT_CLOSED /* connection closed. NOTE: currently this event
+ * is only bound to the read port of the chardev.
+ * Normally the read port and write port of a
+ * chardev should be the same, but it can be
+ * different, e.g., for fd chardevs, when the two
+ * fds are different. So when we received the
+ * CLOSED event it's still possible that the out
+ * port is still open. TODO: we should only send
+ * the CLOSED event when both ports are closed.
+ */
} QEMUChrEvent;
#define CHR_READ_BUF_LEN 4096
--
2.17.1
- [Qemu-devel] [PATCH v5 0/7] monitor: enable OOB by default, Peter Xu, 2018/06/20
- [Qemu-devel] [PATCH v5 4/7] tests: iotests: drop some stderr line, Peter Xu, 2018/06/20
- [Qemu-devel] [PATCH v5 5/7] docs: mention shared state protect for OOB, Peter Xu, 2018/06/20
- [Qemu-devel] [PATCH v5 6/7] monitor: remove "x-oob", turn oob on by default, Peter Xu, 2018/06/20
- [Qemu-devel] [PATCH v5 7/7] Revert "tests: Add parameter to qtest_init_without_qmp_handshake", Peter Xu, 2018/06/20