From owner-freebsd-threads@FreeBSD.ORG Tue Jun 8 05:34:42 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 0702616A4CE; Tue, 8 Jun 2004 05:34:42 +0000 (GMT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C24143D45; Tue, 8 Jun 2004 05:34:41 +0000 (GMT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.10/8.12.1) with ESMTP id i585YXtD029581; Tue, 8 Jun 2004 01:34:33 -0400 (EDT) Date: Tue, 8 Jun 2004 01:34:33 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: John Birrell In-Reply-To: <20040608051347.GA3604@freebsd3.cimlogic.com.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: ports@freebsd.org cc: Dan Nelson cc: Sean McNeil 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 05:34:42 -0000 On Tue, 8 Jun 2004, John Birrell wrote: > [ cross-post lists cut back, ports added 8-) ] > > On Mon, Jun 07, 2004 at 11:48:45PM -0500, Dan Nelson wrote: > > A good addition to bsd.port.mk, right next to the "possible network > > server" etc checks, might be to run ldd on all installed shared > > libraries and print a warning if any threads libraries show up. There > > are a huge number of ports that install shlibs linked to libpthreads. > > Good idea. Just picking a message at random to reply to... In case anyone wonders why we don't use strong references, I chose to mimic what Solaris does: bash-2.05$ nm /lib/libpthread.so.1 | grep pthread_mutex_lock 0000000000003c80 T _pthread_mutex_lock 0000000000003c80 W pthread_mutex_lock bash-2.05$ nm /lib/libc.so.1 | grep pthread_mutex_lock 0000000000096c38 W _pthread_mutex_lock 0000000000096c38 W pthread_mutex_lock It is also easy to provide your own version of pthread_foo() without having any strong references override it. -- Dan Eischen