From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: bdw-gc includes in libguile.h Date: Mon, 28 Mar 2011 21:41:36 +0200 Message-ID: References: <87hbardqgw.fsf@gnu.org> <874o6ovbsa.fsf@gnu.org> <87hbangie2.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1301341304 9854 80.91.229.12 (28 Mar 2011 19:41:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 28 Mar 2011 19:41:44 +0000 (UTC) Cc: guile-devel@gnu.org To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Mar 28 21:41:39 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q4IJl-0006jm-Rh for guile-devel@m.gmane.org; Mon, 28 Mar 2011 21:41:38 +0200 Original-Received: from localhost ([127.0.0.1]:50883 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4IJl-0001iW-9n for guile-devel@m.gmane.org; Mon, 28 Mar 2011 15:41:37 -0400 Original-Received: from [140.186.70.92] (port=40136 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4IJa-0001Wf-OV for guile-devel@gnu.org; Mon, 28 Mar 2011 15:41:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q4IJW-00006V-Ui for guile-devel@gnu.org; Mon, 28 Mar 2011 15:41:26 -0400 Original-Received: from a-pb-sasl-sd.pobox.com ([64.74.157.62]:46222 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q4IJW-00005x-S9; Mon, 28 Mar 2011 15:41:22 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 672033B72; Mon, 28 Mar 2011 15:43:07 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; s=sasl; bh=Zx+WZlVE15KM HA03IsSA27vDvVo=; b=I3waFKRHbFxBQRHq2aO3l1h19JD3liMiLQ/N0a2+KVKl chz+Dwk5T7SxryBEdFfs1fTLqYbWrU9DXdenRgwZOUMmBVqYxfTIIb8kb+bwgN/e 3sjd3Y5Voetai9h8ceas5suLEb4qCB0Ih2fjKp1dgZp1IyBANA3BccZG/rI/JKk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=sasl; b=gLOXQi 6it/XDBG0jFrlQ0PYJJTFLVn3k5EViQxBlYyQALCOMloqy0FoJu5HkNXLULakUrw mPsrFmIgR7Vp53/H7Id2EuSSem7c4egsXOAyeSyIlll7f+So/cJQFxSDr0SF/Glg KwpD/hhVQfBq2ZDjUtBwAuw0Ho40qymydisT4= Original-Received: from a-pb-sasl-sd.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTP id 4BFAE3B71; Mon, 28 Mar 2011 15:43:05 -0400 (EDT) Original-Received: from unquote.localdomain (unknown [90.164.198.39]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-sd.pobox.com (Postfix) with ESMTPSA id ADF7E3B68; Mon, 28 Mar 2011 15:43:03 -0400 (EDT) In-Reply-To: <87hbangie2.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Mon, 28 Mar 2011 21:22:13 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-Pobox-Relay-ID: 997CFCE8-5973-11E0-A659-E8AB60295C12-02397024!a-pb-sasl-sd.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 64.74.157.62 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:12025 Archived-At: Greets :) On Mon 28 Mar 2011 21:22, ludo@gnu.org (Ludovic Court=C3=A8s) writes: > The problem is that libgc ends up being initialized behind our back upon > the first libgc-redirected =E2=80=98pthread_create=E2=80=99 call. Indeed. > Hans Boehm suggested [0] two solutions: > > 1. Disable pthread redirects and instead register threads explicitly > (in =E2=80=98scm_with_guile=E2=80=99). > > 2. Initialize libgc in a constructor. > > I was leaning towards (2), because this way we=E2=80=99d be in control, a= nd in > particular we=E2=80=99d have GC_all_interior_pointers =3D 0. It would on= ly work > on GCC/ELF platforms, and only if libgc wasn=E2=80=99t already initialize= d (for > instance if Guile is used in an application that already uses libgc on > its own)=E2=80=94but that really covers 90% of our use cases. > > I understand you=E2=80=99re in favor of (1). This would give the same be= havior > as in 1.8[*] while being less hackish than (2). However, it=E2=80=99s on= ly > applicable to 2.1. Why is this only applicable to 2.1 ? Regards, Andy --=20 http://wingolog.org/