Skip to content

Commit

Permalink
std library unix/thread.rs: fix NetBSD code for ILP32 CPUs.
Browse files Browse the repository at this point in the history
  • Loading branch information
he32 committed Mar 26, 2024
1 parent af98101 commit 1ad3954
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 1ad3954

Please sign in to comment.