From: Andy Wingo <wingo@pobox.com>
To: Ivan Maidanski <ivmai@mail.ru>
Cc: bug-guile <bug-guile@gnu.org>, gc@linux.hpl.hp.com
Subject: Re: [Gc] pthreads and libgc
Date: Sun, 20 Mar 2011 00:26:19 +0100 [thread overview]
Message-ID: <m3zkoqvgis.fsf@unquote.localdomain> (raw)
In-Reply-To: <E1Q11fF-0001dv-00.ivmai-mail-ru@f119.mail.ru> (Ivan Maidanski's message of "Sat, 19 Mar 2011 22:18:17 +0300")
Hi Ivan,
Thanks for the response.
On Sat 19 Mar 2011 20:18, Ivan Maidanski <ivmai@mail.ru> writes:
> GC_all_interior_pointers cannot be modified after GC_INIT according to
> the spec. GC_set_all_interior_pointers() has an assertion check for this
> condition.
I realize this. We still allow compilation against 6.8, so I can't
blindly use GC_set_all_interior_pointers, though there are
possibilities.
However, that's not quite the issue.
(1) How do I detect that GC has already been initialized, by some other
module, and so avoid the GC_INIT ?
> You could compile GC without -D ALL_INTERIOR_POINTERS.
Unfortunately this is not possible, e.g. on Debian where we use a shared
libgc.
> But, anyway, it is recommended to initialize GC explicitly (i.e. by
> GC_INIT), so placing GC_INIT() (together with
> GC_set_all_interior_pointer) to the beginning of your main() should be
> the best way out.
We can add some documentation to this regard in the manual, if needed.
But is there no way to get around this, and do the right thing? For
example, to avoid implicit GC initialization in response to a
pthread_create.
Best regards,
Andy
--
http://wingolog.org/
next prev parent reply other threads:[~2011-03-19 23:26 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-18 20:56 pthreads and libgc Andy Wingo
[not found] ` <m37hbwxi57.fsf-CaTCM8lwFkgB9AHHLWeGtNQXobZC6xk2@public.gmane.org>
2011-03-19 19:18 ` Ivan Maidanski
2011-03-19 23:26 ` Andy Wingo [this message]
[not found] ` <m3zkoqvgis.fsf-CaTCM8lwFkgB9AHHLWeGtNQXobZC6xk2@public.gmane.org>
2011-03-20 3:51 ` Boehm, Hans
2011-03-21 9:29 ` Ludovic Courtès
2011-03-25 14:49 ` [Gc] " Andy Wingo
2011-04-15 21:35 ` Calling ‘GC_INIT’ from a secondary thread Ludovic Courtès
2011-04-16 9:38 ` [Gc] Calling ‘GC_INIT’from " Ivan Maidanski
2011-04-17 14:01 ` Ludovic Courtès
2011-04-17 14:11 ` Re[2]: [Gc] Calling ‘GC_INIT’ from " Ivan Maidanski
2011-04-17 19:49 ` Ludovic Courtès
2011-04-18 22:18 ` Re[2]: [Gc] Calling ‘GC_INIT’ from a secondarythread Ivan Maidanski
2011-03-20 10:45 ` Re[2]: pthreads and libgc Ivan Maidanski
2011-03-25 14:48 ` [Gc] " Andy Wingo
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
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3zkoqvgis.fsf@unquote.localdomain \
--to=wingo@pobox.com \
--cc=bug-guile@gnu.org \
--cc=gc@linux.hpl.hp.com \
--cc=ivmai@mail.ru \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).