qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Amit Shah <amit.shah@redhat.com>
To: qemu list <qemu-devel@nongnu.org>
Cc: Amit Shah <amit.shah@redhat.com>,
	Gerd Hoffmann <kraxel@redhat.com>,
	Paul Brook <paul@codesourcery.com>
Subject: [Qemu-devel] [PATCH v2 0/5] iohandlers: Add support for enabling/disabling individual handlers
Date: Thu, 13 Jan 2011 20:30:37 +0530	[thread overview]
Message-ID: <cover.1294930723.git.amit.shah@redhat.com> (raw)

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(-)

-- 
1.7.3.4

             reply	other threads:[~2011-01-13 15:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-13 15:00 Amit Shah [this message]
2011-01-13 15:00 ` [Qemu-devel] [PATCH v2 1/5] iohandlers: Avoid code duplication Amit Shah
2011-01-13 15:00 ` [Qemu-devel] [PATCH v2 2/5] iohandlers: Introduce assign_fd_handlers() and remove_fd_handlers Amit Shah
2011-01-13 15:00 ` [Qemu-devel] [PATCH v2 3/5] iohandlers: Allow each iohandler to be enabled/disabled individually Amit Shah
2011-01-13 15:00 ` [Qemu-devel] [PATCH v2 4/5] iohandlers: Enable an iohandler only if the associated handler exists Amit Shah
2011-01-13 15:00 ` [Qemu-devel] [PATCH v2 5/5] iohandlers: Add IOHandlerOps struct Amit Shah
2011-01-13 15:09 ` [Qemu-devel] Re: [PATCH v2 0/5] iohandlers: Add support for enabling/disabling individual handlers Gerd Hoffmann
2011-01-13 19:17 ` Anthony Liguori
2011-01-17 10:18   ` Amit Shah
2011-01-17 14:57     ` Anthony Liguori
2011-01-17 18:30       ` Michael Roth
2011-01-18 11:56       ` Amit Shah
2011-01-18 14:19         ` Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1294930723.git.amit.shah@redhat.com \
    --to=amit.shah@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=paul@codesourcery.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).