rust/library/std/src/sys_common
Matthias Krüger 0f544f280a
Rollup merge of #121666 - ChrisDenton:thread-name, r=cuviper
Use the OS thread name by default if `THREAD_INFO` has not been initialized

Currently if `THREAD_INFO` hasn't been initialized then the name will be set to `None`.  This PR changes it to use the OS thread name by default. This mostly affects foreign threads at the moment but we could expand this to make more use of the OS thread name in the future.

Note: I've only implemented `Thread::get_name` for windows, linux and macos (and macos adjacent) targets. The rest just return `None`.
2024-03-02 16:53:14 +01:00
..
net Match unmatched backticks in library/ 2023-03-03 03:03:29 +01:00
once library: use addr_of! 2024-02-24 16:02:17 +03:00
thread_local_key rename ptr::invalid -> ptr::without_provenance 2024-02-21 20:15:52 +01:00
thread_parking std: synchronize with all calls to unpark in id-based thread parker 2023-08-07 19:13:34 +02:00
wtf8 Move OsStr::slice_encoded_bytes validation to platform modules 2024-01-21 19:51:49 +01:00
backtrace.rs rename ptr::invalid -> ptr::without_provenance 2024-02-21 20:15:52 +01:00
fs.rs Hide Repr details from io::Error, and rework io::Error::new_const. 2022-02-04 18:47:29 -08:00
io.rs Update rand in the stdlib tests, and remove the getrandom feature from it 2023-01-04 14:52:41 -08:00
lazy_box.rs Leak pthreax_mutex_t when it's dropped while locked. 2022-06-16 12:09:12 +02:00
mod.rs Delete architecture-specific memchr code in std::sys 2024-02-20 22:27:39 +01:00
net.rs library: use addr_of! 2024-02-24 16:02:17 +03:00
process.rs also print clearing the environment entirely 2023-08-24 08:08:46 +02:00
tests.rs std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
thread.rs Remove an allocation in min_stack 2023-12-10 13:28:59 -08:00
thread_info.rs Use the OS thread name by default for the current thread 2024-02-27 11:28:10 -03:00
thread_local_dtor.rs std: abort instead of panicking if the global allocator uses TLS 2023-10-04 11:49:48 +02:00
thread_local_key.rs Remove unused std::sys_common::thread_local_key::Key. 2023-04-27 15:25:48 +02:00
wstr.rs Replace NonZero::<_>::new with NonZero::new. 2024-02-15 08:09:42 +01:00
wtf8.rs Move OsStr::slice_encoded_bytes validation to platform modules 2024-01-21 19:51:49 +01:00