Rollup merge of #123038 - he32:netbsd-ilp32-fix, r=workingjubilee

std library thread.rs: fix NetBSD code for ILP32 CPUs.
This commit is contained in:
Matthias Krüger 2024-03-27 05:21:16 +01:00 committed by GitHub
commit d589021b4b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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,