diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-03-27 05:21:16 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-27 05:21:16 +0100 |
| commit | d589021b4b538b3dbb3f2a5203408352679f2e12 (patch) | |
| tree | b148847ebadc223d187b83313f8b9b70bc09ad86 | |
| parent | 4bdf1711c6e29b88404f035b642f1e0ab93aec41 (diff) | |
| parent | 1ad3954668ccad3d00b9d98d9d24fb76fae1c0f9 (diff) | |
| download | rust-d589021b4b538b3dbb3f2a5203408352679f2e12.tar.gz rust-d589021b4b538b3dbb3f2a5203408352679f2e12.zip | |
Rollup merge of #123038 - he32:netbsd-ilp32-fix, r=workingjubilee
std library 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, |
