🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: de.comp.lang.c
Article #7

Re: Where does my thread-local data live ?

#7
From: Chris M. Thomasson
Date: Wed, 18 Nov 2026 00:09
21 lines
1954 bytes
On 11/17/2026 3:04 AM, Bonita Montero wrote:
> Am 15.11.2026 um 21:40 schrieb Chris M. Thomasson:
> 
>> iirc, in the .tdata or .tss. But that might be for ELF. For Windows, 
>> damn... iirc, in the TIB?
> 
> As thread-local data is per thread it isn't in the executable image.
> At least for Windows.

What about:

__declspec(thread) int x;

> 
>> https://learn.microsoft.com/en-us/windows/win32/api/processthreadsapi/ 
>> nf-processthreadsapi-tlsalloc
> 
> This is to allocate a TLS-slot for a new image.
> You almost never need this.
> 
Technical Details
Message-ID: <11diqca$tdad$3@dont-email.me>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <11da9lq$25qpm$3@raubtier-asyl.eternal-september.org> <11dd5co$32h74$1@dont-email.me> <11dhcb5$bitr$1@raubtier-asyl.eternal-september.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.hispagatos.org!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>
Newsgroups: comp.lang.c++,de.comp.lang.c
Subject: Re: Where does my thread-local data live ?
Date: Tue, 17 Nov 2026 16:09:46 -0800
Organization: A noiseless patient Spider
Lines: 21
Message-ID: <11diqca$tdad$3@dont-email.me>
References: <11da9lq$25qpm$3@raubtier-asyl.eternal-september.org>
 <11dd5co$32h74$1@dont-email.me>
 <11dhcb5$bitr$1@raubtier-asyl.eternal-september.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 18 Nov 2026 00:09:47 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="963917"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/Q3Pb0qyPjmSlZchT3Az97BZu8Zg3LttA="; posting-host="893e20b5c86f3e4847392c6cf1971416"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:95RBg6Svgd8uSp4gA9qpiJVam6g= sha256:bUMQt9YDgEOflW1SHwAGAeXLgk2Xtl79jzSSxBeUD1g=
	sha1:Pu4jEMbX6/A4/AWKwKyStH6Sll0= sha256:PcLggW/eUrptEXZIt8uHHkiNkBjAlhFZNNOy1njm7v8=
In-Reply-To: <11dhcb5$bitr$1@raubtier-asyl.eternal-september.org>
Content-Language: en-US