<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/library/std/src/sys_common/thread_local_key, branch master</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=master</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=master'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2024-06-15T15:47:35+00:00</updated>
<entry>
<title>std: refactor the TLS implementation</title>
<updated>2024-06-15T15:47:35+00:00</updated>
<author>
<name>joboet</name>
<email>jonasboettiger@icloud.com</email>
</author>
<published>2024-06-15T15:47:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f3facf11758af878bcfaf47fc773962dbb565024'/>
<id>urn:sha1:f3facf11758af878bcfaf47fc773962dbb565024</id>
<content type='text'>
As discovered by Mara in #110897, our TLS implementation is a total mess. In the past months, I have simplified the actual macros and their expansions, but the majority of the complexity comes from the platform-specific support code needed to create keys and register destructors. In keeping with #117276, I have therefore moved all of the `thread_local_key`/`thread_local_dtor` modules to the `thread_local` module in `sys` and merged them into a new structure, so that future porters of `std` can simply mix-and-match the existing code instead of having to copy the same (bad) implementation everywhere. The new structure should become obvious when looking at `sys/thread_local/mod.rs`.

Unfortunately, the documentation changes associated with the refactoring have made this PR rather large. That said, this contains no functional changes except for two small ones:
* the key-based destructor fallback now, by virtue of sharing the implementation used by macOS and others, stores its list in a `#[thread_local]` static instead of in the key, eliminating one indirection layer and drastically simplifying its code.
* I've switched over ZKVM (tier 3) to use the same implementation as WebAssembly, as the implementation was just a way worse version of that

Please let me know if I can make this easier to review! I know these large PRs aren't optimal, but I couldn't think of any good intermediate steps.

@rustbot label +A-thread-locals
</content>
</entry>
<entry>
<title>rename ptr::invalid -&gt; ptr::without_provenance</title>
<updated>2024-02-21T19:15:52+00:00</updated>
<author>
<name>Ralf Jung</name>
<email>post@ralfj.de</email>
</author>
<published>2024-02-11T18:04:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b58f647d5488dce73bba517907c44af2c2a618c4'/>
<id>urn:sha1:b58f647d5488dce73bba517907c44af2c2a618c4</id>
<content type='text'>
also introduce ptr::dangling matching NonNull::dangling
</content>
</entry>
<entry>
<title>Update test.</title>
<updated>2023-04-27T13:25:48+00:00</updated>
<author>
<name>Mara Bos</name>
<email>m-ou.se@m-ou.se</email>
</author>
<published>2023-04-27T13:25:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0b3073abb1b4f783deaf3860fe745c586ae2bded'/>
<id>urn:sha1:0b3073abb1b4f783deaf3860fe745c586ae2bded</id>
<content type='text'>
</content>
</entry>
<entry>
<title>avoid some int2ptr casts in thread_local_key tests</title>
<updated>2022-08-11T13:39:25+00:00</updated>
<author>
<name>Ralf Jung</name>
<email>post@ralfj.de</email>
</author>
<published>2022-08-11T13:39:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b5786dcae6c5a300f146fcbf6dab509d2cd48ec8'/>
<id>urn:sha1:b5786dcae6c5a300f146fcbf6dab509d2cd48ec8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>std: move "mod tests/benches" to separate files</title>
<updated>2020-08-31T02:56:59+00:00</updated>
<author>
<name>Lzu Tao</name>
<email>taolzu@gmail.com</email>
</author>
<published>2020-08-27T13:45:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a4e926daeeaedc9178846711daf1f4cb6ce505fb'/>
<id>urn:sha1:a4e926daeeaedc9178846711daf1f4cb6ce505fb</id>
<content type='text'>
Also doing fmt inplace as requested.
</content>
</entry>
</feed>
