From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 12 16:12:04 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC6A2106564A; Fri, 12 Sep 2008 16:12:04 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id 489938FC13; Fri, 12 Sep 2008 16:12:04 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtp (Exim 4.63 (FreeBSD)) (envelope-from ) id 1KeBFa-000688-AF; Fri, 12 Sep 2008 19:12:02 +0300 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m8CGBxuk030308 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 12 Sep 2008 19:11:59 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m8CGBwbJ041194; Fri, 12 Sep 2008 19:11:58 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id m8CGBwj8041192; Fri, 12 Sep 2008 19:11:58 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 12 Sep 2008 19:11:58 +0300 From: Kostik Belousov To: Jeremy Chadwick Message-ID: <20080912161158.GL39652@deviant.kiev.zoral.com.ua> References: <48CA555A.4050104@gmail.com> <20080912131045.GA56923@icarus.home.lan> <20080912135110.GA57637@icarus.home.lan> <48CA8402.5040207@gmail.com> <20080912154520.GA60094@icarus.home.lan> <20080912160900.GC60094@icarus.home.lan> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="RWntzN4uhMukjMHt" Content-Disposition: inline In-Reply-To: <20080912160900.GC60094@icarus.home.lan> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.93.3, clamav-milter version 0.93.3 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1KeBFa-000688-AF b945a9ce78cdeaba9941dcf739772ebf X-Terabit: YES Cc: Daniel Eischen , freebsd-hackers@freebsd.org, Barry Andrews Subject: Re: loading multi threaded library into executable enabled for single thread X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Sep 2008 16:12:04 -0000 --RWntzN4uhMukjMHt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 12, 2008 at 09:09:00AM -0700, Jeremy Chadwick wrote: > On Fri, Sep 12, 2008 at 11:55:01AM -0400, Barry Andrews wrote: > > Yes, the exe is tclsh. I understand that linking tclsh with libpthread = is > > what would work. However this is very impractical. A user of my library > > shouldn't have to rebuild their tclsh to match my library specs. Another > > option would be to ship tclsh with my lib, but that also is a little we= ird. > > It seems like the only somewhat practical option I have is to use > > LD_PRELOAD, which is also weird but better than nothing. >=20 > This really isn't a "FreeBSD problem", as the same sort of issue plagues > other operating systems. When it comes to threading, you want > *everything* threaded as much as possible -- mix-matching usually does > not work. The only OS I have seen where that kind of environment works > reliably is Solaris. I still feel threading is "too new" of a Yeah, they merged libpthread and libc some time ago, AFAIR :). --RWntzN4uhMukjMHt Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkjKlM4ACgkQC3+MBN1Mb4iT4wCeOJBDDQx5enlv0rdg3pMw3Xyq Q6AAn0J3j1/pjGpALafRS92/W5E4YvUX =0s+k -----END PGP SIGNATURE----- --RWntzN4uhMukjMHt--