diff options
| author | joboet <jonasboettiger@icloud.com> | 2024-06-25 18:30:49 +0200 |
|---|---|---|
| committer | joboet <jonasboettiger@icloud.com> | 2024-06-25 18:30:49 +0200 |
| commit | e8516f8b52d8ae49c2e0b2ff2cb5faf28b1a6526 (patch) | |
| tree | 6189b6b6314462940616634a18cb6386e5e0d1e0 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | 164e1297e1bce47a241e4d93a9f044452b288715 (diff) | |
| download | rust-e8516f8b52d8ae49c2e0b2ff2cb5faf28b1a6526.tar.gz rust-e8516f8b52d8ae49c2e0b2ff2cb5faf28b1a6526.zip | |
std: separate TLS key creation from TLS access
Currently, `std` performs an atomic load to get the OS key on every access to `StaticKey` even when the key is already known. This PR thus replaces `StaticKey` with the platform-specific `get` and `set` function and a new `LazyKey` type that acts as a `LazyLock<Key>`, allowing the reuse of the retreived key for multiple accesses.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
