From owner-freebsd-threads@FreeBSD.ORG Sun Jul 18 16:30:30 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 0C8AA16A4CE; Sun, 18 Jul 2004 16:30:30 +0000 (GMT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id A4FC143D48; Sun, 18 Jul 2004 16:30:29 +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 i6IGUSjh000017; Sun, 18 Jul 2004 12:30:28 -0400 (EDT) Date: Sun, 18 Jul 2004 12:30:28 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Robert Watson In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: threads@freebsd.org Subject: Re: A way to build and install libpthread as 1:1 as well as M:N? 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: Sun, 18 Jul 2004 16:30:30 -0000 On Sun, 18 Jul 2004, Robert Watson wrote: > > I'm doing some stability and performance testing as part of the network > stack locking work. I'd like a way to easily plug and play the > configuration of libpthread at run-time (although restarting apps is fine, > rebooting is less preferable, as is actually rebuilding!). It looks like > right now if I want to switch the operating mode of libpthread to 1:1, I > have to recompile it with different compile options and have a separate > library floating around that I plug. Could we arrange for it to be a > runtime switch of some sort (perhaps read once when the app starts), or > build the library both ways by default and intall with different names? The way to do this so it is switchable without relinking the application (and without using libmap.conf) is to use LD_LIBRARY_PATH. You can install libpthread built as 1:1 anywhere you like and just set LD_LIBRARY_PATH to wherever it is installed. If you want both 1:1 and M:N versions of libpthread installed by default, we have to decide where to install the 1:1 version. I would recommend 1:1 go in lib/lwp/libpthread.so.1 and M:N in lib/libpthread.so.1. You could change "lwp" to "kse" or something else. -- Dan Eischen