iohandlers: Add support for enabling/disabling individual handlers
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest5 patches 7 repliesIn review
- v15 patches 10 repliesSuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | iohandlers: Avoid code duplicationvl.c | +26 | 0 replies | |
| 2/5 | iohandlers: Introduce assign_fd_handlers() and remove_fd_handlersqemu-char.h vl.c | +35 | 0 replies | |
| 3/5 | iohandlers: Allow each iohandler to be enabled/disabled individuallyqemu-char.h vl.c | +79 | 0 replies | |
| 4/5 | iohandlers: Enable an iohandler only if the associated handler existsvl.c | +20 | 0 replies | |
| 5/5 | iohandlers: Add IOHandlerOps structqemu-char.h vl.c | +38 | 0 replies |
Reviews trailers per patch
None of the 5 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Gerd Hoffmann |
|---|---|
| Series | A-b |
| 1/5 | |
| 2/5 | |
| 3/5 | |
| 4/5 | |
| 5/5 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Qemu-devel] [PATCH v2 0/5] iohandlers: Add support for enabling/disabling individual handlers
Hi,
This patchset adds new interfaces to work with iohandlers. It adds:
int assign_fd_handlers(int fd, IOHandlerOps *ops, void *opaque)
-- Specify io handlers for an fd
int remove_fd_handlers(int fd)
-- Remove fd handlers for fd (mark ioh for deletion)
int set_read_poll_fd_action(int fd, bool enable)
-- Enable or disable the fd_read_poll fd handler
int set_read_fd_action(int fd, bool enable)
-- Enable or disable the fd_read fd handler
int set_write_fd_action(int fd, bool enable)
-- Enable or disable the fd_read fd handler
A new struct, IOHandlerOps, is added, to collect all the ops together instead of passing individual ones to functions.
The older function, qemu_set_fd_handler2(), is now a wrapper to assign_fd_handlers() and can be deprecated by converting the existing usage to assign_fd_handlers().
v2: Address comments from Gerd:
- add comments to new interfaces
- enable all specified handlers by default in assign_fd_handlers()
- Add comments for TODO items on deprecation of older interfaces.
Please apply.
Amit Shah (5):
iohandlers: Avoid code duplication
iohandlers: Introduce assign_fd_handlers() and remove_fd_handlers
iohandlers: Allow each iohandler to be enabled/disabled individually
iohandlers: Enable an iohandler only if the associated handler exists
iohandlers: Add IOHandlerOps struct
qemu-char.h | 7 ++ vl.c | 197 ++++++++++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 170 insertions(+), 34 deletions(-)
Signature · 1 line
1.7.3.4