From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 1/3] Don't use g_thread_get_initialized.
Date: Wed, 7 Sep 2011 15:02:15 +0200 [thread overview]
Message-ID: <1315400537-25487-2-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1315400537-25487-1-git-send-email-kraxel@redhat.com>
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 <kraxel@redhat.com>
---
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
next prev parent reply other threads:[~2011-09-07 13:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-07 13:02 [Qemu-devel] [PATCH 0/3] Fix build failures Gerd Hoffmann
2011-09-07 13:02 ` Gerd Hoffmann [this message]
2011-09-22 3:11 ` [Qemu-devel] [PATCH 1/3] Don't use g_thread_get_initialized TeLeMan
2011-09-07 13:02 ` [Qemu-devel] [PATCH 2/3] Use hex instead of binary Gerd Hoffmann
2011-09-07 13:02 ` [Qemu-devel] [PATCH 3/3] vns/tls: don't use depricated gnutls functions Gerd Hoffmann
2011-09-07 15:11 ` Stefan Weil
2011-09-07 15:52 ` [Qemu-devel] [PATCH v2] " Gerd Hoffmann
2011-09-09 18:34 ` [Qemu-devel] [PATCH 0/3] Fix build failures Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1315400537-25487-2-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).