From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel Subject: Re: bdw-gc includes in libguile.h Date: Mon, 28 Mar 2011 22:40:47 +0200 Message-ID: <87k4fjf06o.fsf@gnu.org> 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 1301344868 31864 80.91.229.12 (28 Mar 2011 20:41:08 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 28 Mar 2011 20:41:08 +0000 (UTC) Cc: guile-devel@gnu.org To: Andy Wingo Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Mar 28 22:40:59 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 1Q4JFD-0001aC-2t for guile-devel@m.gmane.org; Mon, 28 Mar 2011 22:40:59 +0200 Original-Received: from localhost ([127.0.0.1]:55392 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4JFC-0000mM-Gx for guile-devel@m.gmane.org; Mon, 28 Mar 2011 16:40:58 -0400 Original-Received: from [140.186.70.92] (port=60802 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q4JF5-0000m2-FY for guile-devel@gnu.org; Mon, 28 Mar 2011 16:40:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q4JF4-0001wo-7L for guile-devel@gnu.org; Mon, 28 Mar 2011 16:40:51 -0400 Original-Received: from solo.fdn.fr ([80.67.169.19]:41813) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q4JF4-0001wj-1q for guile-devel@gnu.org; Mon, 28 Mar 2011 16:40:50 -0400 Original-Received: from nixey (reverse-83.fdn.fr [80.67.176.83]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) (Authenticated sender: lcourtes) by smtp.fdn.fr (Postfix) with ESMTPSA id 4F82344B56; Mon, 28 Mar 2011 22:40:48 +0200 (CEST) X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 8 Germinal an 219 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu In-Reply-To: (Andy Wingo's message of "Mon, 28 Mar 2011 21:41:36 +0200") User-Agent: Gnus/5.110013 (No Gnus v0.13) Emacs/23.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 80.67.169.19 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:12028 Archived-At: Hello, Andy Wingo writes: > 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, = and in >> particular we=E2=80=99d have GC_all_interior_pointers =3D 0. It would o= nly work >> on GCC/ELF platforms, and only if libgc wasn=E2=80=99t already initializ= ed (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 b= ehavior >> as in 1.8[*] while being less hackish than (2). However, it=E2=80=99s o= nly >> applicable to 2.1. > > Why is this only applicable to 2.1 ? I was thinking it=E2=80=99d break the ABI, but maybe not? Ludo=E2=80=99.