qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH 2/5] iohandlers: Introduce assign_fd_handlers()


From: Gerd Hoffmann
Subject: [Qemu-devel] Re: [PATCH 2/5] iohandlers: Introduce assign_fd_handlers() and remove_fd_handlers
Date: Thu, 13 Jan 2011 14:59:26 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101208 Red Hat/3.1.7-3.el6_0 Thunderbird/3.1.7

On 01/13/11 14:00, Amit Shah wrote:
This function will be used to assign fd handlers.  Future commits will
be enable each handler to be enabled/disabled individually.

Make qemu_set_fd_handler2() a wrapper to assign_fd_handlers().

remove_fd_handlers() removes all the assigned handlers and marks the
iohandler for deletion.  It's a wrapper to assign_fd_handlers() with
NULL handlers.

Signed-off-by: Amit Shah<address@hidden>
---
  qemu-char.h |    6 ++++++
  vl.c        |   24 +++++++++++++++++++-----
  2 files changed, 25 insertions(+), 5 deletions(-)

diff --git a/qemu-char.h b/qemu-char.h
index e6ee6c4..0ef83f4 100644
--- a/qemu-char.h
+++ b/qemu-char.h
@@ -109,6 +109,12 @@ size_t qemu_chr_mem_osize(const CharDriverState *chr);

  /* async I/O support */

+int assign_fd_handlers(int fd,
+                       IOCanReadHandler *fd_read_poll,
+                       IOHandler *fd_read,
+                       IOHandler *fd_write,
+                       void *opaque);
+void remove_fd_handlers(int fd);

A comment documenting the new functions would be nice.

cheers,
  Gerd




reply via email to

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