From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O9H4F-0004Y9-Nw for qemu-devel@nongnu.org; Tue, 04 May 2010 08:17:39 -0400 Received: from [140.186.70.92] (port=59607 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O9H4C-0004Xb-OO for qemu-devel@nongnu.org; Tue, 04 May 2010 08:17:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O9H4A-0007Hy-Q1 for qemu-devel@nongnu.org; Tue, 04 May 2010 08:17:36 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30495) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O9D1E-0008Jc-Mi for qemu-devel@nongnu.org; Tue, 04 May 2010 03:58:16 -0400 Date: Tue, 4 May 2010 13:26:23 +0530 From: Amit Shah Message-ID: <20100504075623.GA8136@amit-x200.redhat.com> References: <1272957442-7832-1-git-send-email-amit.shah@redhat.com> <1272957442-7832-2-git-send-email-amit.shah@redhat.com> <1272957442-7832-3-git-send-email-amit.shah@redhat.com> <1272957442-7832-4-git-send-email-amit.shah@redhat.com> <4BDFD008.3000106@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4BDFD008.3000106@redhat.com> Subject: [Qemu-devel] Re: [PATCH v4 3/5] char: unix/tcp: Add a non-blocking write handler List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Paul Brook , qemu list , Juan Quintela On (Tue) May 04 2010 [09:43:04], Gerd Hoffmann wrote: > On 05/04/10 09:17, Amit Shah wrote: >> Add a non-blocking write handler that can return with -EAGAIN to the >> caller and also callback when the socket becomes writable. >> >> Non-blocking writes are only enabled for sockets that are opened in >> non-blocking mode and only for callers that have registered a callback >> handler for resuming writes. > > The logic will be pretty much the same for all filehandle-based backends > on unix. So maybe create some helper functions, so implementing > $backend_chr_write_unblocked can be done with just three lines of code? Yes, that's the next step. Let's push this for now and do that in a later patch series? Amit