rust/library/std/src
bors fd1f8aa05d Auto merge of #127912 - joboet:tls_dtor_thread_current, r=cuviper
std: make `thread::current` available in all `thread_local!` destructors

... and thereby allow the panic runtime to always print the right thread name.

This works by modifying the TLS destructor system to schedule a runtime cleanup function after all other TLS destructors registered by `std` have run. Unfortunately, this doesn't affect foreign TLS destructors, `thread::current` will still panic there.

Additionally, the thread ID returned by `current_id` will now always be available, even inside the global allocator, and will not change during the lifetime of one thread (this was previously the case with key-based TLS).

The mechanisms I added for this (`local_pointer` and `thread_cleanup`) will also allow finally fixing #111272 by moving the signal stack to a similar runtime-cleanup TLS variable.
2024-10-03 03:31:47 +00:00
..
backtrace remove redundant imports 2023-12-10 10:56:22 +08:00
collections Update hashbrown to 0.15 and adjust some methods 2024-10-02 09:44:51 +02:00
env Fix std tests for wasm32-wasip2 target 2024-09-29 04:48:13 +02:00
error Reformat use declarations. 2024-07-29 08:26:52 +10:00
f16 std float tests: special-case Miri in feature detection 2024-08-08 12:17:50 +02:00
f32 these tests seem to work fine on i586 these days 2024-09-10 15:57:40 -07:00
f64 these tests seem to work fine on i586 these days 2024-09-10 15:57:40 -07:00
f128 Add core functions for f16 and f128 that require math routines 2024-08-01 15:38:53 -04:00
ffi Use &raw in the standard library 2024-09-25 17:03:20 -07:00
fs Use &raw in the standard library 2024-09-25 17:03:20 -07:00
hash std: implement the random feature 2024-09-23 10:29:51 +02:00
io Rollup merge of #130914 - compiler-errors:insignificant-dtor, r=Amanieu 2024-09-30 19:18:50 -04:00
net Rollup merge of #129638 - nickrum:wasip2-net, r=alexcrichton 2024-09-30 19:18:49 -04:00
num removed nonfunctioning benchmark 2024-01-11 11:30:12 -05:00
os Rollup merge of #130861 - cuviper:sun-path-offset, r=ibraheemdev 2024-09-27 00:43:33 +02:00
panic
path Fix std tests for wasm32-wasip2 target 2024-09-29 04:48:13 +02:00
pipe Cleanup sys module to match house style 2024-07-30 19:22:54 +00:00
prelude Avoid comments that describe multiple use items. 2024-07-17 08:02:46 +10:00
process Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
sync mpmc doctest: make sure main thread waits for child threads 2024-10-02 08:00:17 +02:00
sys std: make thread::current available in all thread_local! destructors 2024-10-02 18:04:21 +02:00
sys_common Fix std tests for wasm32-wasip2 target 2024-09-29 04:48:13 +02:00
thread std: make thread::current available in all thread_local! destructors 2024-10-02 18:04:21 +02:00
time Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
alloc.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
ascii.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
backtrace.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
env.rs Rollup merge of #128535 - mmvanheusden:master, r=workingjubilee 2024-09-17 17:28:31 +02:00
error.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
f16.rs copysign with sign being a NaN is non-portable 2024-08-28 12:06:28 +02:00
f32.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
f64.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
f128.rs copysign with sign being a NaN is non-portable 2024-08-28 12:06:28 +02:00
fs.rs Fix std tests for wasm32-wasip2 target 2024-09-29 04:48:13 +02:00
keyword_docs.rs Trivial grammar fix in const keyword docs 2024-08-06 21:59:04 -05:00
lib.miri.rs add 'x.py miri', and make it work for 'library/{core,alloc,std}' 2024-04-03 20:27:20 +02:00
lib.rs Add multi-producer, multi-consumer channel (mpmc) 2024-09-30 20:43:51 +03:00
macros.rs Add math functions for f16 and f128 2024-08-01 15:38:51 -04:00
num.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
panic.rs Auto merge of #128321 - BatmanAoD:catch-unwind-doc-update, r=Mark-Simulacrum 2024-09-29 05:54:47 +00:00
panicking.rs Rollup merge of #130846 - ChrisDenton:revert-break, r=Noratrieb 2024-09-26 22:20:54 -07:00
pat.rs Add pattern types to parser 2024-04-08 11:57:17 +00:00
path.rs Use &raw in the standard library 2024-09-25 17:03:20 -07:00
pipe.rs Reformat using the new identifier sorting from rustfmt 2024-09-22 19:11:29 -04:00
process.rs Fix std tests for wasm32-wasip2 target 2024-09-29 04:48:13 +02:00
random.rs add link from random() helper fn to extensive DefaultRandomSource docs 2024-09-25 08:25:36 +02:00
rt.rs std: make thread::current available in all thread_local! destructors 2024-10-02 18:04:21 +02:00
time.rs [Clippy] Swap instant_subtraction to use diagnostic item instead of path 2024-09-19 13:13:42 +01:00