From owner-freebsd-threads@FreeBSD.ORG Thu Aug 5 14:45:16 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 8255416A4CE for ; Thu, 5 Aug 2004 14:45:16 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7F64E43D39; Thu, 5 Aug 2004 14:45:16 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from [127.0.0.1] (davidxu@localhost [127.0.0.1]) i75EjDGZ007970; Thu, 5 Aug 2004 14:45:15 GMT (envelope-from davidxu@freebsd.org) Message-ID: <411248DA.3080607@freebsd.org> Date: Thu, 05 Aug 2004 22:48:58 +0800 From: David Xu User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.7.1) Gecko/20040730 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Doug Rabson References: <200408050940.36506.dfr@nlsystems.com> In-Reply-To: <200408050940.36506.dfr@nlsystems.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-threads@freebsd.org Subject: Re: Pthread patches for TLS 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: Thu, 05 Aug 2004 14:45:16 -0000 This patch does not work for statically linked binary even if the binary does not use __thread, I think you still need to use malloc to allocate memory for tcb if it is being compiled as a static library. I have tested it on AMD64, dynamically linked binary works fine. David Xu Doug Rabson wrote: >This is the current state of my patches to add TLS support to libpthread >and libthr. I have added code for i386, amd64 and ia64 but I've only >tested i386. I believe the code for amd64 is right. I don't much like >what I've done to the ia64 version though. I would like to commit only >the i386 version at this stage. The amd64 code could be committed if >someone tests it. > >