Skip to content

Commit

Permalink
Rollup merge of rust-lang#123038 - he32:netbsd-ilp32-fix, r=workingju…
Browse files Browse the repository at this point in the history
…bilee

std library thread.rs: fix NetBSD code for ILP32 CPUs.
  • Loading branch information
matthiaskrgr authored Mar 27, 2024
2 parents 4bdf171 + 1ad3954 commit d589021
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/std/src/sys/pal/unix/thread.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit d589021

Please sign in to comment.