From owner-freebsd-hackers@FreeBSD.ORG Mon Dec 22 01:13:46 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2CA6E16A4CE for ; Mon, 22 Dec 2003 01:13:46 -0800 (PST) Received: from mtaw4.prodigy.net (mtaw4.prodigy.net [64.164.98.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9E68643D62 for ; Mon, 22 Dec 2003 01:13:42 -0800 (PST) (envelope-from julian@elischer.org) Received: from elischer.org ([209.233.196.26]) by mtaw4.prodigy.net (8.12.10/8.12.10) with ESMTP id hBM9DeVJ012587; Mon, 22 Dec 2003 01:13:41 -0800 (PST) Message-ID: <3FE6B4B1.4070001@elischer.org> Date: Mon, 22 Dec 2003 01:09:05 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4b) Gecko/20030524 X-Accept-Language: en, hu MIME-Version: 1.0 To: Alfred Perlstein References: <20031221203311.GW60229@elvis.mu.org> <20031222010257.GY60229@elvis.mu.org> In-Reply-To: <20031222010257.GY60229@elvis.mu.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Mon, 22 Dec 2003 01:14:15 -0800 cc: hackers@freebsd.org Subject: Re: support for __thread X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Dec 2003 09:13:46 -0000 Alfred Perlstein wrote: > > > > Well yes, but first would be getting the toolchain to emit > proper code... It'd help but the linker is where all the action happens.. Marcel seems to understand this quite well. > > > I can give the ld.so work a shot if someone gives me a general > idea of how to get at the linker sets and registers in C code. WHen you have read and understood the document that describes the __thread implementation then I guess the next step would be to read and understand ld (and the rt version). > > It would be nice if it worked with libc_r as well, is there > any chance for that? Webstone doesn't need kernel threads > really... the relatively lightweight nature of libc_r doing > strictly network IO makes it an attractive solution for what > I'm trying to accomplish. Once it has been done for libpthread then it is almost free for libc_r because in libc_r we can set %gx once and forget it and just change the address it points to whenever we schedule a different thread. > -- +------------------------------------+ ______ _ __ | __--_|\ Julian Elischer | \ U \/ / hard at work in | / \ julian@elischer.org +------>x USA \ a very strange | ( OZ ) \___ ___ | country ! +- X_.---._/ presently in San Francisco \_/ \\ v