From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:51121) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1Hlt-0003eI-3r for qemu-devel@nongnu.org; Wed, 07 Sep 2011 09:02:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R1Hlm-0000B4-OW for qemu-devel@nongnu.org; Wed, 07 Sep 2011 09:02:29 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4197) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1Hlm-0000Ai-HX for qemu-devel@nongnu.org; Wed, 07 Sep 2011 09:02:22 -0400 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 p87D2LCs028277 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 7 Sep 2011 09:02:21 -0400 From: Gerd Hoffmann Date: Wed, 7 Sep 2011 15:02:15 +0200 Message-Id: <1315400537-25487-2-git-send-email-kraxel@redhat.com> In-Reply-To: <1315400537-25487-1-git-send-email-kraxel@redhat.com> References: <1315400537-25487-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 1/3] Don't use g_thread_get_initialized. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Initialize glib threads unconditionally in main() instead of using g_thread_get_initialized in the 9p code. Fixes a build failure on RHEL-5, which ships glib 2.12. g_thread_get_initialized was added in 2.20. Signed-off-by: Gerd Hoffmann --- hw/9pfs/virtio-9p-coth.c | 4 ---- vl.c | 1 + 2 files changed, 1 insertions(+), 4 deletions(-) diff --git a/hw/9pfs/virtio-9p-coth.c b/hw/9pfs/virtio-9p-coth.c index ae05658..25556cc 100644 --- a/hw/9pfs/virtio-9p-coth.c +++ b/hw/9pfs/virtio-9p-coth.c @@ -67,10 +67,6 @@ int v9fs_init_worker_threads(void) /* Leave signal handling to the iothread. */ pthread_sigmask(SIG_SETMASK, &set, &oldset); - /* init thread system if not already initialized */ - if (!g_thread_get_initialized()) { - g_thread_init(NULL); - } if (qemu_pipe(notifier_fds) == -1) { ret = -1; goto err_out; diff --git a/vl.c b/vl.c index 5ba9b35..6e998af 100644 --- a/vl.c +++ b/vl.c @@ -2200,6 +2200,7 @@ int main(int argc, char **argv, char **envp) error_set_progname(argv[0]); g_mem_set_vtable(&mem_trace); + g_thread_init(NULL); init_clocks(); -- 1.7.1