diff options
| author | Havard Eidnes <he@NetBSD.org> | 2024-03-25 15:35:22 +0000 |
|---|---|---|
| committer | Havard Eidnes <he@NetBSD.org> | 2024-03-26 08:39:42 +0000 |
| commit | 1ad3954668ccad3d00b9d98d9d24fb76fae1c0f9 (patch) | |
| tree | 119b57e4f4179d1fbdf3f673e6cba8559806a058 | |
| parent | af98101ed89dba94309c64f1fbf37c890d988f9f (diff) | |
| download | rust-1ad3954668ccad3d00b9d98d9d24fb76fae1c0f9.tar.gz rust-1ad3954668ccad3d00b9d98d9d24fb76fae1c0f9.zip | |
std library unix/thread.rs: fix NetBSD code for ILP32 CPUs.
| -rw-r--r-- | library/std/src/sys/pal/unix/thread.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/sys/pal/unix/thread.rs b/library/std/src/sys/pal/unix/thread.rs index a3e1b6782e8..4cd7c0e3059 100644 --- a/library/std/src/sys/pal/unix/thread.rs +++ b/library/std/src/sys/pal/unix/thread.rs @@ -424,7 +424,7 @@ pub fn available_parallelism() -> io::Result<NonZero<usize>> { if !set.is_null() { let mut count: usize = 0; if libc::pthread_getaffinity_np(libc::pthread_self(), libc::_cpuset_size(set), set) == 0 { - for i in 0..u64::MAX { + for i in 0..libc::cpuid_t::MAX { match libc::_cpuset_isset(i, set) { -1 => break, 0 => continue, |
