Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #119436 - semarie:openbsd-available_parallelism, r=Mark…
…-Simulacrum openbsd: available_parallelism: use the right API use the standard `sysconf(_SC_NPROCESSORS_ONLN)` way to get the number of available processors (capable of running processes), and fallback to `sysctl([CTL_HW, HW_NCPU])` (number of CPUs configured) only on error. it permits to differenciate CPUs online (capable of running processes) vs CPUs configured (not necessary capable of running processes). while here, use the common code path for BSDs for doing that, and avoid code duplication. Problem initially reported to me by Jiri Navratil.
- Loading branch information