From owner-freebsd-arch@FreeBSD.ORG Wed Feb 8 14:51:48 2012 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D50E31065672 for ; Wed, 8 Feb 2012 14:51:48 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theravensnest.org [109.169.23.128]) by mx1.freebsd.org (Postfix) with ESMTP id 7C6F18FC0A for ; Wed, 8 Feb 2012 14:51:48 +0000 (UTC) Received: from [192.168.0.2] (cpc1-cwma8-2-0-cust257.7-3.cable.virginmedia.com [82.20.153.2]) (authenticated bits=0) by theravensnest.org (8.14.4/8.14.4) with ESMTP id q18EEHfJ009567 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO) for ; Wed, 8 Feb 2012 14:14:18 GMT (envelope-from theraven@FreeBSD.org) From: David Chisnall Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Date: Wed, 8 Feb 2012 14:14:12 +0000 Message-Id: <58175263-109E-4FF0-BB29-E0331C01DCD5@FreeBSD.org> To: freebsd-arch@FreeBSD.org Mime-Version: 1.0 (Apple Message framework v1257) X-Mailer: Apple Mail (2.1257) Cc: Subject: NO_TLS flag for public headers X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Feb 2012 14:51:48 -0000 Hi, The xlocale changes in libc mean that a lot of things that were = previously global state are now per-thread. This includes some things = that were used in ctype.h and are inlined. We're now losing the benefit = of inlining them because we now have to call into libc to get the = per-thread values. I'd like to use TLS for caching these things, but we = currently have no equivalent of the NO_TLS flag for public headers. I'd = like to have a __NO_TLS that can be set in cdefs.h for architectures = that don't have TLS support. Any comments? Objections? Anyone want to propose a better place for it = (or, indeed, add it, since I'm not entirely sure which architectures do = lack TLS support...) David=