From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=57638 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PdNjk-0004xT-Lw for qemu-devel@nongnu.org; Thu, 13 Jan 2011 09:01:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PdNjj-0008BH-3o for qemu-devel@nongnu.org; Thu, 13 Jan 2011 09:01:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:38508) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PdNji-0008B4-S0 for qemu-devel@nongnu.org; Thu, 13 Jan 2011 09:01:11 -0500 Date: Thu, 13 Jan 2011 19:30:57 +0530 From: Amit Shah Message-ID: <20110113140057.GC19434@amit-x200.redhat.com> References: <1bdf0a5a5de06cfb332ac17c439ef79cabb835db.1294923288.git.amit.shah@redhat.com> <4D2F044D.7020709@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D2F044D.7020709@redhat.com> Subject: [Qemu-devel] Re: [PATCH 3/5] iohandlers: Allow each iohandler to be enabled/disabled individually List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu list , Paul Brook On (Thu) Jan 13 2011 [14:55:25], Gerd Hoffmann wrote: > On 01/13/11 14:00, Amit Shah wrote: > > { > >- return assign_fd_handlers(fd, fd_read_poll, fd_read, fd_write, opaque); > >+ assign_fd_handlers(fd, fd_read_poll, fd_read, fd_write, opaque); > >+ set_read_poll_fd_action(fd, true); > >+ set_read_fd_action(fd, true); > >+ set_write_fd_action(fd, true); > >+ return 0; > > } > > I'd suggest to move the *action calls into assign_fd_handlers() so > the handlers default to being enabled in all cases. This should > match what most users need and thus minimize the number of *_action > calls needed. What may happen with that is the fd may get select()-ed for an operation that it didn't want to be put on the queue for. Amit