From: "Andreas Färber" <andreas.faerber@web.de>
To: qemu-devel@nongnu.org
Cc: "Andreas Färber" <andreas.faerber@web.de>
Subject: [Qemu-devel] [PATCH 2/3] vl.c: Guard against GThread double-initialization
Date: Tue, 1 Nov 2011 20:56:28 +0100 [thread overview]
Message-ID: <1320177389-22498-3-git-send-email-andreas.faerber@web.de> (raw)
In-Reply-To: <1320177389-22498-1-git-send-email-andreas.faerber@web.de>
GThread-ERROR **: GThread system may only be initialized once.
aborting...
Making the g_thread_init() call in vl.c conditional resolves an abort on
Mac OS X, where coroutine-gthread.c seems to call it before vl.c.
Reported-by: Juan Pineda <juan@logician.com>
Signed-off-by: Andreas Färber <andreas.faerber@web.de>
Cc: Daniel P. Berrange <berrange@redhat.com>
---
vl.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/vl.c b/vl.c
index b56e0cb..624da0f 100644
--- a/vl.c
+++ b/vl.c
@@ -2185,7 +2185,9 @@ int main(int argc, char **argv, char **envp)
error_set_progname(argv[0]);
g_mem_set_vtable(&mem_trace);
- g_thread_init(NULL);
+ if (!g_thread_supported()) {
+ g_thread_init(NULL);
+ }
runstate_init();
--
1.7.0.3
next prev parent reply other threads:[~2011-11-01 19:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-01 19:56 [Qemu-devel] [PULL 0/3] Cocoa fixes for 1.0 Andreas Färber
2011-11-01 19:56 ` [Qemu-devel] [PATCH 1/3] MAINTAINERS: Add Cocoa maintainer Andreas Färber
2011-11-01 19:56 ` Andreas Färber [this message]
2011-11-01 19:56 ` [Qemu-devel] [PATCH 3/3] cocoa: Close sheet after image file selection Andreas Färber
2011-11-01 22:42 ` [Qemu-devel] [PULL 0/3] Cocoa fixes for 1.0 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=1320177389-22498-3-git-send-email-andreas.faerber@web.de \
--to=andreas.faerber@web.de \
--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).