We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4bdf171 + 1ad3954 commit d589021Copy full SHA for d589021
library/std/src/sys/pal/unix/thread.rs
@@ -424,7 +424,7 @@ pub fn available_parallelism() -> io::Result<NonZero<usize>> {
424
if !set.is_null() {
425
let mut count: usize = 0;
426
if libc::pthread_getaffinity_np(libc::pthread_self(), libc::_cpuset_size(set), set) == 0 {
427
- for i in 0..u64::MAX {
+ for i in 0..libc::cpuid_t::MAX {
428
match libc::_cpuset_isset(i, set) {
429
-1 => break,
430
0 => continue,
0 commit comments