From owner-freebsd-threads@FreeBSD.ORG Tue Jun 8 19:00:54 2004 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8F7E216A4CE for ; Tue, 8 Jun 2004 19:00:54 +0000 (GMT) Received: from mail.mcneil.com (rrcs-west-24-199-45-54.biz.rr.com [24.199.45.54]) by mx1.FreeBSD.org (Postfix) with ESMTP id 64C8443D53 for ; Tue, 8 Jun 2004 19:00:52 +0000 (GMT) (envelope-from sean@mcneil.com) Received: from localhost (localhost.mcneil.com [127.0.0.1]) by mail.mcneil.com (Postfix) with ESMTP id E3C5CFD03A; Tue, 8 Jun 2004 12:00:51 -0700 (PDT) Received: from mail.mcneil.com ([127.0.0.1]) by localhost (server.mcneil.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 36801-09; Tue, 8 Jun 2004 12:00:51 -0700 (PDT) Received: from [24.199.45.54] (mcneil.com [24.199.45.54]) by mail.mcneil.com (Postfix) with ESMTP id 60290FD031; Tue, 8 Jun 2004 12:00:51 -0700 (PDT) From: Sean McNeil To: Julian Elischer In-Reply-To: References: Content-Type: text/plain Message-Id: <1086721251.44183.14.camel@server.mcneil.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Tue, 08 Jun 2004 12:00:51 -0700 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at mcneil.com cc: Joe Marcus Clarke cc: freebsd-threads@freebsd.org Subject: Re: weak implementation of threads has problems - kse fix attached X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Jun 2004 19:00:54 -0000 On Tue, 2004-06-08 at 01:05, Julian Elischer wrote: > On Tue, 8 Jun 2004, Daniel Eischen wrote: > > > [ trimmed to threads@ ] > > > > On Tue, 8 Jun 2004, Joe Marcus Clarke wrote: > > > > > On Tue, 2004-06-08 at 00:32, Daniel Eischen wrote: > > > > On Mon, 7 Jun 2004, Sean McNeil wrote: > > > > > > > > > > > > > > Up front, I'd like to make a few apologies: > > > > > > > > > > 1) I am sorry for the length of this email. > > > > > 2) Although some very valid opinions have been expressed, I respectfully > > > > > have to disagree. This email will hopefully strengthen my position. > > > > > > > > Please stop spamming multiple lists. > > > > > > > > No, I don't want to litter all our thread libraries with strong references. > > > > As I've said before, build your shared libraries correctly so they don't > > > > bring in the threads library. > > Can you explain to me in words of 1 sylable why libpthread should not > have strong symbols? I haven't been following this argument.. As far as I can tell, there is no good reason. So far, there has been a lot of talk about how to deal with threading because of this very issue. Here is how threads were designed to work on all other platforms: If a shared library wants to be thread-safe, they include CFLAGS definitions for any include file magic that may have to be done. They do not link the shared library to the libpthread library. If a shared library is using threads (create, join, etc.) then they still do the CFLAGS defs but they also link to the pthread library. An application would link to the libraries they desire to use. They don't care if some library they use pulls in pthread or not. They only care when the application itself uses threads. If it is a direct library dependency, the linker would make the application depend on pthread. For instance, libORBit02.so.0 might be used by a gnome application, but it doesn't need to know or care that ORBit uses threads. libc functions should be global symbols in libpthread that override the functionality usually provided by libc. I fail to see why this is opposed by the FreeBSD community, the reasons behind the opposition, or why this entire thread has started trying to work around the mistake of making them weak symbols instead of just fixing the underlying problem by making them strong references. Sean