Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Feb 2012 22:51:22 +0100
From:      Marius Strobl <marius@alchemy.franken.de>
To:        David Chisnall <theraven@freebsd.org>
Cc:        freebsd-arch@freebsd.org
Subject:   Re: NO_TLS flag for public headers
Message-ID:  <20120208215122.GA28769@alchemy.franken.de>
In-Reply-To: <58175263-109E-4FF0-BB29-E0331C01DCD5@FreeBSD.org>
References:  <58175263-109E-4FF0-BB29-E0331C01DCD5@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Feb 08, 2012 at 02:14:12PM +0000, David Chisnall wrote:
> 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...)
> 

See lib/libc/stdlib/malloc.c, arm and mips currently are the only
supported FreeBSD architectures that have no support for TLS.

Marius




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120208215122.GA28769>