From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:40230) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGlI3-0005fU-Ty for qemu-devel@nongnu.org; Wed, 26 Sep 2012 02:40:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TGlHx-0004qi-UA for qemu-devel@nongnu.org; Wed, 26 Sep 2012 02:40:11 -0400 Received: from mail-wi0-f181.google.com ([209.85.212.181]:39402) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGlHx-0004jx-MU for qemu-devel@nongnu.org; Wed, 26 Sep 2012 02:40:05 -0400 Received: by wibhq12 with SMTP id hq12so183738wib.10 for ; Tue, 25 Sep 2012 23:40:03 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5062A341.9050300@redhat.com> Date: Wed, 26 Sep 2012 08:40:01 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1348577763-12920-1-git-send-email-pbonzini@redhat.com> <1348577763-12920-12-git-send-email-pbonzini@redhat.com> <87obktn4f0.fsf@codemonkey.ws> In-Reply-To: <87obktn4f0.fsf@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 11/17] aio: make AioContexts GSources List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org Il 26/09/2012 00:06, Anthony Liguori ha scritto: >> > if (node) { >> > + g_source_remove_poll(&ctx->source, &node->pfd); >> > + > Why remove vs. setting events = 0? Because otherwise you'd get a dangling pointer to node->pfd. :) Paolo > add_poll/remove_poll also comes with an event loop notify which I don't > think is strictly necessary here. >