rust/library/std/src/sys
bors 4e725bad73 Auto merge of #97191 - wesleywiser:main_thread_name, r=ChrisDenton
Call the OS function to set the main thread's name on program init

Normally, `Thread::spawn` takes care of setting the thread's name, if
one was provided, but since the main thread wasn't created by calling
`Thread::spawn`, we need to call that function in `std::rt::init`.

This is mainly useful for system tools like debuggers and profilers
which might show the thread name to a user. Prior to these changes, gdb
and WinDbg would show all thread names except the main thread's name to
a user. I've validated that this patch resolves the issue for both
debuggers.
2022-06-04 20:27:53 +00:00
..
common resolve the conflict in compiler/rustc_session/src/parse.rs 2022-03-16 20:12:30 +08:00
hermit Use Drop instead of destroy() for locks. 2022-06-03 16:45:47 +02:00
itron Use Drop instead of destroy() for locks. 2022-06-03 16:45:47 +02:00
sgx Lazily allocate+initialize locks. 2022-06-03 17:04:14 +02:00
solid Use Drop instead of destroy() for locks. 2022-06-03 16:45:47 +02:00
unix Auto merge of #97191 - wesleywiser:main_thread_name, r=ChrisDenton 2022-06-04 20:27:53 +00:00
unsupported Lazily allocate+initialize locks. 2022-06-03 17:04:14 +02:00
wasi Use Rust 2021 prelude in std itself. 2022-05-09 11:12:32 +02:00
wasm Lazily allocate+initialize locks. 2022-06-03 17:04:14 +02:00
windows Auto merge of #97191 - wesleywiser:main_thread_name, r=ChrisDenton 2022-06-04 20:27:53 +00:00
mod.rs Use target_family = "wasm" 2021-11-10 08:35:42 -08:00