about summary refs log tree commit diff
path: root/library/std/src/sys/solid
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-10-13 06:49:29 +0000
committerbors <bors@rust-lang.org>2022-10-13 06:49:29 +0000
commitfa0ca783f89a83046e6ce0383385ba5b28296435 (patch)
treebdb171fd02b693ed091c393d4d284981c0b9b3f4 /library/std/src/sys/solid
parent3cf5fc58d56adeee42abb7e5059c718b0a86857d (diff)
parentd4578013541a5c6ae34b62a83e8dcb11fb6d4b05 (diff)
downloadrust-fa0ca783f89a83046e6ce0383385ba5b28296435.tar.gz
rust-fa0ca783f89a83046e6ce0383385ba5b28296435.zip
Auto merge of #102655 - joboet:windows_tls_opt, r=ChrisDenton
Optimize TLS on Windows

This implements the suggestion in the current TLS code to embed the linked list of destructors in the `StaticKey` structure to save allocations. Additionally, locking is avoided when no destructor needs to be run. By using one Windows-provided `Once` per key instead of a global lock, locking is more finely-grained (this unblocks #100579).
Diffstat (limited to 'library/std/src/sys/solid')
-rw-r--r--library/std/src/sys/solid/thread_local_key.rs5
1 files changed, 0 insertions, 5 deletions
diff --git a/library/std/src/sys/solid/thread_local_key.rs b/library/std/src/sys/solid/thread_local_key.rs
index b17521f701d..b37bf999698 100644
--- a/library/std/src/sys/solid/thread_local_key.rs
+++ b/library/std/src/sys/solid/thread_local_key.rs
@@ -19,8 +19,3 @@ pub unsafe fn get(_key: Key) -> *mut u8 {
 pub unsafe fn destroy(_key: Key) {
     panic!("should not be used on the solid target");
 }
-
-#[inline]
-pub fn requires_synchronized_create() -> bool {
-    panic!("should not be used on the solid target");
-}