unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Andy Wingo <wingo@pobox.com>
Cc: guile-devel@gnu.org
Subject: Re: bdw-gc includes in libguile.h
Date: Mon, 28 Mar 2011 22:40:47 +0200	[thread overview]
Message-ID: <87k4fjf06o.fsf@gnu.org> (raw)
In-Reply-To: <m34o6nav7z.fsf@unquote.localdomain> (Andy Wingo's message of "Mon, 28 Mar 2011 21:41:36 +0200")

Hello,

Andy Wingo <wingo@pobox.com> writes:

> On Mon 28 Mar 2011 21:22, ludo@gnu.org (Ludovic Courtès) writes:
>
>> The problem is that libgc ends up being initialized behind our back upon
>> the first libgc-redirected ‘pthread_create’ call.
>
> Indeed.
>
>> Hans Boehm suggested [0] two solutions:
>>
>>   1. Disable pthread redirects and instead register threads explicitly
>>      (in ‘scm_with_guile’).
>>
>>   2. Initialize libgc in a constructor.
>>
>> I was leaning towards (2), because this way we’d be in control, and in
>> particular we’d have GC_all_interior_pointers = 0.  It would only work
>> on GCC/ELF platforms, and only if libgc wasn’t already initialized (for
>> instance if Guile is used in an application that already uses libgc on
>> its own)—but that really covers 90% of our use cases.
>>
>> I understand you’re in favor of (1).  This would give the same behavior
>> as in 1.8[*] while being less hackish than (2).  However, it’s only
>> applicable to 2.1.
>
> Why is this only applicable to 2.1 ?

I was thinking it’d break the ABI, but maybe not?

Ludo’.



  reply	other threads:[~2011-03-28 20:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-25  9:38 bdw-gc includes in libguile.h Andy Wingo
2011-03-25 16:44 ` Andy Wingo
2011-03-25 18:06 ` Ludovic Courtès
2011-03-25 18:44   ` Andy Wingo
2011-03-27 15:11     ` Ludovic Courtès
2011-03-28  7:35       ` Andy Wingo
2011-03-28 19:22         ` Ludovic Courtès
2011-03-28 19:41           ` Andy Wingo
2011-03-28 20:40             ` Ludovic Courtès [this message]
2011-03-29  9:16               ` Andy Wingo
2011-03-30 16:15                 ` Ludovic Courtès
2011-03-30 16:23                   ` Andy Wingo
2011-05-26 16:48     ` 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=87k4fjf06o.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guile-devel@gnu.org \
    --cc=wingo@pobox.com \
    /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).