about summary refs log tree commit diff
path: root/library/std/src/sys/pal/unix/thread.rs
diff options
context:
space:
mode:
authorLaurențiu Nicola <lnicola@users.noreply.github.com>2025-02-17 12:30:13 +0000
committerGitHub <noreply@github.com>2025-02-17 12:30:13 +0000
commit0c9c489355a25ad6c89f6b009743a780b2ac97bd (patch)
tree7dc4e427cc53a909fe61c9f68086084073a58fff /library/std/src/sys/pal/unix/thread.rs
parent2a0d16f3c481cdf28366f88d3824f4a30ff806c9 (diff)
parent952bfae057206f01c3afd126752389eef353b56a (diff)
downloadrust-0c9c489355a25ad6c89f6b009743a780b2ac97bd.tar.gz
rust-0c9c489355a25ad6c89f6b009743a780b2ac97bd.zip
Merge pull request #19169 from lnicola/sync-from-rust
minor: Sync from downstream
Diffstat (limited to 'library/std/src/sys/pal/unix/thread.rs')
-rw-r--r--library/std/src/sys/pal/unix/thread.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/library/std/src/sys/pal/unix/thread.rs b/library/std/src/sys/pal/unix/thread.rs
index 356669980c7..69c99782f0b 100644
--- a/library/std/src/sys/pal/unix/thread.rs
+++ b/library/std/src/sys/pal/unix/thread.rs
@@ -23,7 +23,7 @@ mod zircon {
     type zx_status_t = i32;
     pub const ZX_PROP_NAME: u32 = 3;
 
-    extern "C" {
+    unsafe extern "C" {
         pub fn zx_object_set_property(
             handle: zx_handle_t,
             property: u32,
@@ -144,7 +144,7 @@ impl Thread {
                     const TASK_COMM_LEN: usize = 16;
                     let name = truncate_cstr::<{ TASK_COMM_LEN }>(name);
                 } else {
-                    // FreeBSD, DragonFly, FreeBSD and NuttX do not enforce length limits.
+                    // FreeBSD, DragonFly BSD and NuttX do not enforce length limits.
                 }
             };
             // Available since glibc 2.12, musl 1.1.16, and uClibc 1.0.20 for Linux,
@@ -230,7 +230,7 @@ impl Thread {
     #[cfg(target_os = "vxworks")]
     pub fn set_name(name: &CStr) {
         // FIXME(libc): adding real STATUS, ERROR type eventually.
-        extern "C" {
+        unsafe extern "C" {
             fn taskNameSet(task_id: libc::TASK_ID, task_name: *mut libc::c_char) -> libc::c_int;
         }
 
@@ -506,7 +506,7 @@ pub fn available_parallelism() -> io::Result<NonZero<usize>> {
         } else if #[cfg(target_os = "vxworks")] {
             // Note: there is also `vxCpuConfiguredGet`, closer to _SC_NPROCESSORS_CONF
             // expectations than the actual cores availability.
-            extern "C" {
+            unsafe extern "C" {
                 fn vxCpuEnabledGet() -> libc::cpuset_t;
             }