diff options
| author | bors <bors@rust-lang.org> | 2025-01-25 08:56:41 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-01-25 08:56:41 +0000 |
| commit | f94018810c6c0f59df013c9c418e994b94cf1805 (patch) | |
| tree | a9bba926836b86bd7bd0df4b7cc94e08e8a7bda4 /library/std/src | |
| parent | 6365178a6bee1ccf2a4960ecc9285c245e8978a9 (diff) | |
| parent | a330c7ee858a03dacaf10a7f88abb38eb4f1858a (diff) | |
| download | rust-f94018810c6c0f59df013c9c418e994b94cf1805.tar.gz rust-f94018810c6c0f59df013c9c418e994b94cf1805.zip | |
Auto merge of #136041 - matthiaskrgr:rollup-5r1k45x, r=matthiaskrgr
Rollup of 9 pull requests Successful merges: - #135971 (Properly report error when object type param default references self) - #135977 (Fix `FormattingOptions` instantiation with `Default`) - #135985 (Rename test to `unresolvable-upvar-issue-87987.rs` and add some notes) - #135991 (Fix set_name in thread mod for NuttX) - #136009 (bootstrap: Handle bootstrap lockfile race condition better) - #136018 (Use short ty string for move errors) - #136027 (Skip suggestions in `derive`d code) - #136029 (Bootstrap: Don't move ownership of job object) - #136034 (fix(bootstrap): deserialize null as `f64::NAN`) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/std/src')
| -rw-r--r-- | library/std/src/sys/pal/unix/thread.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/library/std/src/sys/pal/unix/thread.rs b/library/std/src/sys/pal/unix/thread.rs index f657f82e6e3..356669980c7 100644 --- a/library/std/src/sys/pal/unix/thread.rs +++ b/library/std/src/sys/pal/unix/thread.rs @@ -130,7 +130,12 @@ impl Thread { } } - #[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "dragonfly"))] + #[cfg(any( + target_os = "linux", + target_os = "freebsd", + target_os = "dragonfly", + target_os = "nuttx" + ))] pub fn set_name(name: &CStr) { unsafe { cfg_if::cfg_if! { @@ -139,7 +144,7 @@ impl Thread { const TASK_COMM_LEN: usize = 16; let name = truncate_cstr::<{ TASK_COMM_LEN }>(name); } else { - // FreeBSD and DragonFly BSD do not enforce length limits. + // FreeBSD, DragonFly, FreeBSD and NuttX do not enforce length limits. } }; // Available since glibc 2.12, musl 1.1.16, and uClibc 1.0.20 for Linux, @@ -150,7 +155,7 @@ impl Thread { } } - #[cfg(any(target_os = "openbsd", target_os = "nuttx"))] + #[cfg(target_os = "openbsd")] pub fn set_name(name: &CStr) { unsafe { libc::pthread_set_name_np(libc::pthread_self(), name.as_ptr()); |
