Received: from eggs.gnu.org ([2001:4830:134:3::10]:34829) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTpBO-0003Os-1Z for qemu-devel@nongnu.org; Wed, 09 Oct 2013 04:31:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTpBI-0004VC-2a for qemu-devel@nongnu.org; Wed, 09 Oct 2013 04:31:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:17234) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTpBH-0004Us-Qg for qemu-devel@nongnu.org; Wed, 09 Oct 2013 04:31:43 -0400 Date: Wed, 9 Oct 2013 10:31:41 +0200 From: Stefan Hajnoczi Message-ID: <20131009083141.GB25631@stefanha-thinkpad.muc.redhat.com> References: <1381226311-23489-1-git-send-email-stefanha@redhat.com> <20131008122550.GD25109@dhcp-200-207.str.redhat.com> <525403C1.2060206@redhat.com> <20131008135824.GJ25109@dhcp-200-207.str.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20131008135824.GJ25109@dhcp-200-207.str.redhat.com> Subject: Re: [Qemu-devel] [PATCH] osdep: initialize glib threads in all QEMU tools List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: mario.dechenno@unina2.it, Paolo Bonzini , qemu-devel@nongnu.org On Tue, Oct 08, 2013 at 03:58:24PM +0200, Kevin Wolf wrote: > Am 08.10.2013 um 15:08 hat Paolo Bonzini geschrieben: > > Il 08/10/2013 14:25, Kevin Wolf ha scritto: > > > The glib documentation says: > > > > > > Since version 2.24, calling g_thread_init() multiple times is > > > allowed, but nothing happens except for the first call. > > > > > > I take that this means previously it wasn't allowed. qemu's configure > > > checks for a minimum version of 2.12, so we seems to support glib > > > versions that don't allow g_thread_init() to be called multiple times. > > > > > > Do we need to protect against this? > > > > I think that's the point of the "if (!g_thread_supported ())" tests. > > Ah yes, I think you're right. Not the best function name I've ever seen > that glib uses there, but okay. That's correct, g_thread_support() is there to initialize once only. Stefan