From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=36253 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Prrzm-0002ZJ-F6 for qemu-devel@nongnu.org; Tue, 22 Feb 2011 08:09:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Prrzl-0004fN-AH for qemu-devel@nongnu.org; Tue, 22 Feb 2011 08:09:38 -0500 Received: from mx1.redhat.com ([209.132.183.28]:21103) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Prrzk-0004fF-Rn for qemu-devel@nongnu.org; Tue, 22 Feb 2011 08:09:37 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p1MD9ZoF030825 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 22 Feb 2011 08:09:36 -0500 Date: Tue, 22 Feb 2011 18:39:30 +0530 From: Amit Shah Subject: Re: [Qemu-devel] [PATCH 2/7] iohandlers: Introduce a new API Message-ID: <20110222130930.GA3793@amit-x200.redhat.com> References: <3d41a2ca603b8132e2496976e89fca09fc246683.1298369272.git.amit.shah@redhat.com> <20110222123903.GC18372@playa.tlv.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110222123903.GC18372@playa.tlv.redhat.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu list , Gerd Hoffmann On (Tue) 22 Feb 2011 [14:39:03], Alon Levy wrote: > On Tue, Feb 22, 2011 at 03:48:31PM +0530, Amit Shah wrote: > > Introduce a new iohandler api that doesn't have multiple callbacks. > > Instead, a single callback and a mask of events that got set will be > > passed on to the handler. This will ease our transition to a poll() > > interface instead of the current select() that happens on the fds. > > Is the mask argument to the callback indicative of a real mask, or is > this an enum when passed to the clients? i.e. you seem to use a switch > in all handlers, so is it actually meant that each callback has a single > possible value, not an or'ed one? Hm, this will actually be a bug when we get rid of the _can_read callbacks. So the switch will have to change to something else for sure. Amit