From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=41044 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PxK5J-00022s-Ui for qemu-devel@nongnu.org; Wed, 09 Mar 2011 09:09:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PxK5I-00060Z-Nt for qemu-devel@nongnu.org; Wed, 09 Mar 2011 09:09:53 -0500 Received: from mail-qw0-f45.google.com ([209.85.216.45]:62940) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PxK5I-00060M-LK for qemu-devel@nongnu.org; Wed, 09 Mar 2011 09:09:52 -0500 Received: by qwj8 with SMTP id 8so473766qwj.4 for ; Wed, 09 Mar 2011 06:09:52 -0800 (PST) Sender: Paolo Bonzini Message-ID: <4D778A28.5010901@redhat.com> Date: Wed, 09 Mar 2011 15:09:44 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1299528642-23631-1-git-send-email-mdroth@linux.vnet.ibm.com> <1299528642-23631-2-git-send-email-mdroth@linux.vnet.ibm.com> In-Reply-To: <1299528642-23631-2-git-send-email-mdroth@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [RFC][PATCH v7 01/16] Move code related to fd handlers into utility functions List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Roth Cc: agl@linux.vnet.ibm.com, stefanha@linux.vnet.ibm.com, markus_mueller@de.ibm.com, qemu-devel@nongnu.org, abeekhof@redhat.com, aliguori@linux.vnet.ibm.com, Jes.Sorensen@redhat.com On 03/07/2011 09:10 PM, Michael Roth wrote: > + > +/* XXX: fd_read_poll should be suppressed, but an API change is > + necessary in the character devices to suppress fd_can_read(). */ > +int qemu_set_fd_handler3(void *ioh_record_list, > + int fd, > + IOCanReadHandler *fd_read_poll, > + IOHandler *fd_read, > + IOHandler *fd_write, > + void *opaque) What's the reason to introduce this additional indirection (and with a void rather than opaque pointer)? A global iohandlers list would be fine in qemu-ioh.c (and it would be a worthwhile patch anyway for QEMU). Paolo