mirror of
https://github.com/rust-lang/rust
synced 2024-10-02 23:04:50 +00:00
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:
commit
d589021b4b
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue