From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id E65F7BBBB for ; Wed, 1 Mar 2006 12:23:27 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id k21BNRC1025136 for ; Wed, 1 Mar 2006 12:23:27 +0100 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id MAA29537 for ; Wed, 1 Mar 2006 12:23:26 +0100 (MET) Received: from mail.enyo.de (mail.enyo.de [212.9.189.167]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k21BNPBt031059 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Wed, 1 Mar 2006 12:23:26 +0100 Received: from deneb.vpn.enyo.de ([212.9.189.177] helo=deneb.enyo.de) by mail.enyo.de with esmtp id 1FEPQS-0001hw-IP; Wed, 01 Mar 2006 12:23:24 +0100 Received: from fw by deneb.enyo.de with local (Exim 4.60) (envelope-from ) id 1FELuF-0000ek-JO; Wed, 01 Mar 2006 08:37:55 +0100 From: Florian Weimer To: skaller Cc: caml-list@inria.fr Subject: Re: [Caml-list] Re: Thread Local Storage References: <1139890002.8591.429.camel@rosella.wigram> <87irrhtya3.fsf@mid.deneb.enyo.de> <1139955690.8591.799.camel@rosella.wigram> Date: Wed, 01 Mar 2006 08:37:55 +0100 In-Reply-To: <1139955690.8591.799.camel@rosella.wigram> (skaller@users.sourceforge.net's message of "Wed, 15 Feb 2006 09:21:29 +1100") Message-ID: <87y7zuhay4.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Miltered: at concorde with ID 4405842F.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 4405842D.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 pointer:01 stack:01 wrote:01 functions:01 argument:01 tls:01 tls:01 thread:02 thread:02 data:02 florian:02 florian:02 implicit:03 hack:04 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 > On Tue, 2006-02-14 at 22:40 +0100, Florian Weimer wrote: >> > TLS is entirely a legacy application backwards compatibility hack >> > designed to support badly designed C applications. >> >> TLS helps a lot on a certain register-starved architecture because you >> don't need to keep a pointer to the thread data structure around in >> case you don't need it (but called functions might). > > What's wrong with placing it on the stack? Do you suggest to add an implicit argument to all function calls? Unless you can optimize it away if it's not needed, the TLS approach should still be faster for typical code.