Skip to content

Commit

Permalink
Unrolled build for rust-lang#123038
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#123038 - he32:netbsd-ilp32-fix, r=workingjubilee

std library thread.rs: fix NetBSD code for ILP32 CPUs.
  • Loading branch information
rust-timer committed Mar 27, 2024
2 parents 435b525 + 1ad3954 commit 821da4b
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 821da4b

Please sign in to comment.