[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 04/60] main-loop: document IOCanReadHandler
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 04/60] main-loop: document IOCanReadHandler |
Date: |
Thu, 28 Jun 2018 22:04:14 +0200 |
From: Stefan Hajnoczi <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
---
include/qemu/main-loop.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/include/qemu/main-loop.h b/include/qemu/main-loop.h
index 6b4b60b..721aa24 100644
--- a/include/qemu/main-loop.h
+++ b/include/qemu/main-loop.h
@@ -168,6 +168,20 @@ void qemu_del_wait_object(HANDLE handle, WaitObjectFunc
*func, void *opaque);
/* async I/O support */
typedef void IOReadHandler(void *opaque, const uint8_t *buf, int size);
+
+/**
+ * IOCanReadHandler: Return the number of bytes that #IOReadHandler can accept
+ *
+ * This function reports how many bytes #IOReadHandler is prepared to accept.
+ * #IOReadHandler may be invoked with up to this number of bytes. If this
+ * function returns 0 then #IOReadHandler is not invoked.
+ *
+ * This function is typically called from an event loop. If the number of
+ * bytes changes outside the event loop (e.g. because a vcpu thread drained the
+ * buffer), then it is necessary to kick the event loop so that this function
+ * is called again. aio_notify() or qemu_notify_event() can be used to kick
+ * the event loop.
+ */
typedef int IOCanReadHandler(void *opaque);
/**
--
1.8.3.1
- [Qemu-devel] [PULL 00/60] Misc patches for soft freeze, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 03/60] chardev: don't splatter terminal settings on exit if not previously set, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 01/60] exec: Fix MAP_RAM for cached access, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 02/60] move public invalidate APIs out of translate-all.{c, h}, clean up, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 06/60] target/i386: Fix BLSR and BLSI, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 07/60] whpx: commit missing file, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 04/60] main-loop: document IOCanReadHandler,
Paolo Bonzini <=
- [Qemu-devel] [PULL 05/60] hw/char/serial: Only retry if qemu_chr_fe_write returns 0, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 08/60] memory-device: turn alignment assert into check, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 09/60] exec: check that alignment is a power of two, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 13/60] QemuMutex: support --enable-debug-mutex, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 12/60] qemu-thread: introduce qemu-thread-common.h, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 10/60] kvm: Delete the slot if and only if the KVM_MEM_READONLY flag is changed, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 11/60] tests/atomic_add-bench: add -m option to use mutexes, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 17/60] pc-dimm: remove leftover "struct pc_dimms_capacity", Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 15/60] Replace '-enable-kvm' with '-accel kvm' in docs and help texts, Paolo Bonzini, 2018/06/28
- [Qemu-devel] [PULL 18/60] pc: rename pc_dimm_(plug|unplug|...)* into pc_memory_(plug|unplug|...)*, Paolo Bonzini, 2018/06/28