From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55656) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bP43p-0000ZQ-HZ for qemu-devel@nongnu.org; Mon, 18 Jul 2016 04:37:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bP43m-0005Qt-8s for qemu-devel@nongnu.org; Mon, 18 Jul 2016 04:37:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50459) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bP43m-0005Qo-3O for qemu-devel@nongnu.org; Mon, 18 Jul 2016 04:37:54 -0400 Date: Mon, 18 Jul 2016 09:37:49 +0100 From: "Daniel P. Berrange" Message-ID: <20160718083749.GJ1670@redhat.com> Reply-To: "Daniel P. Berrange" References: <1468827650-17234-1-git-send-email-zhangchen.fnst@cn.fujitsu.com> <1468827650-17234-6-git-send-email-zhangchen.fnst@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1468827650-17234-6-git-send-email-zhangchen.fnst@cn.fujitsu.com> Subject: Re: [Qemu-devel] [RFC PATCH V7 5/7] qemu-char: Fix context for g_source_attach() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Zhang Chen Cc: qemu devel , Jason Wang , Li Zhijian , Wen Congyang , zhanghailiang , "eddie . dong" , "Dr . David Alan Gilbert" , Paolo Bonzini On Mon, Jul 18, 2016 at 03:40:48PM +0800, Zhang Chen wrote: > We want to poll and handle chardev in another thread > other than main loop. But qemu_chr_add_handlers() can only > work for global default context other than thread default context. > So we use g_source_attach(xx, g_main_context_get_thread_default()) > replace g_source_attach(xx, NULL) to attach g_source. > Comments from jason. > > Cc: Daniel P . Berrange > Cc: Paolo Bonzini > > Signed-off-by: Zhang Chen > Signed-off-by: Jason Wang > --- > io/channel.c | 2 +- > qemu-char.c | 6 +++--- > 2 files changed, 4 insertions(+), 4 deletions(-) So, on further reflection I'm against adding this patch - please see my comments against the next patch for why I think this is not needed nor desirable. Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|