rust/library/std
Chris Denton a9f8f8b070
Rollup merge of #122583 - Zoxc:tls-non-mut, r=joboet
Use `UnsafeCell` for fast constant thread locals

This uses `UnsafeCell` instead of `static mut` for fast constant thread locals. This changes the type of the TLS shims to return `&UnsafeCell<T>` instead of `*mut T` which means they are always non-null so LLVM can optimize away the check for `Some` in `LocalKey::with` if `T` has no destructor.

LLVM is currently unable to do this optimization as we lose the fact that `__getit` always returns `Some` as it gets optimized to just returning the value of the TLS shim.
2024-03-16 18:27:34 +00:00
..
benches
src Rollup merge of #122583 - Zoxc:tls-non-mut, r=joboet 2024-03-16 18:27:34 +00:00
tests Update feature names for new stdarch 2024-01-30 03:33:12 +00:00
build.rs std: enabling new netbsd (10) calls. 2024-02-11 08:48:02 +00:00
Cargo.toml add platform-specific function to get the error number for HermitOS 2024-02-28 23:01:56 +01:00